1

I would like to »straighten« a cubic bezier path, such that its arc length is preserved.

enter image description here

The coordinates of A, B and their control Points (C and D) are given, as well as their destinations (A' and B'). So while animating A to A' and B to B' I need to calculate values for C and D as well, to make the line appear equally long.

As described here for the arc length:

for cubic and higher Bézier curves, there is no way to solve this function if you want to use it "for all possible coordinates".

Has anybody come over that before?

philipp
  • 15,947
  • 15
  • 61
  • 106
  • 1
    If you don't need the length to stay *exactly* invariant, you could simply move `A, B, C, D` in a straight line towards their target points. – meowgoesthedog Apr 02 '19 at 08:57
  • Which way should `C,D` take? They could fall together with `A'` and `B'`… Is there any approximation how big the »error« could be? – philipp Apr 02 '19 at 11:06
  • Your formulation is slightly confusing: if `A`, `B`, `C`, `D`, `A'` and `B'` are given, what is missing? – Dominik Mokriš Apr 02 '19 at 20:47
  • `C` and `D` over time, such that the arc length always stays the same. – philipp Apr 02 '19 at 21:31

0 Answers0