Help simulating a Spline curve

Hi,

I was playing with Synfig trying to animate how Bézier (or splines) curves are created in order to use them in my classes.
I have arrived here:
bezier_v03

source file: bezier_v03.sifz (6,0 KB)

I would say the way this quadratic curve is created is well designed… I mean, the animated lines and the black dot which is the one that “draws” the final curve)

My “problem” comes when drawing the red line, that is, the resulting curve. I drawn it with the Spline tool and it doesn’t fit (note that the tangent handles are placed at P1 point):

I don’t know if this is not the correct way to draw it or if Synfig internally only draws cubic curves or… my approach is wrong.

BTW if I try to hack it and use the handles to fake it and make it follow the black dot this is what happens:

It looks almost right, but the tangent handles are placed at no singular place, just anywhere… Looking at the video (or the Synfig file I attached), you will see that the animated red line doesn’t follow exactly the black dot but get retarded or even ahead it in part ot the path.

So, the question for Synfig gurus is: where is/are my errors? or should I take a different approach to simulate it?

Thanks!

Because spline with 2 vertices isn’t quadratic Bezier curve but cubic, you get 4 points P0, P1, P2 and P3 instead P0, P1, P2. This part video shows that middle line simply isn’t shown.

I don’t know how to get quadratic one in Synfig, you need at least 2 vertices (cubic Bezier curve) to draw something

Thanks for your answer, it helped me to improve the simulation in order to use a quadratic curve and not a cubic one:

But as you see there is still an error so I guess the Synfig curve it’s not quadratic or can’t be exactly simulated here…

What stills bothers me is that the speeds of the points are not aligned… I haven’t figured out where the problem relays:

bezier_v04

bezier_v04.sifz (6,4 KB)

BTW, I’m using linear waypoints everywhere…

Just a wild guess here. Since you are using linear waypoints for the two points. And they have the same starting and ending point. And they seem to start and end at the same time. It makes sense for them to not move at the same speed as their paths are not the same distance.

Agree,move distance (Amount) is a percentage of curve length
t

And the track is synchronized

bezier1
bezier2
bezier3
bezier1.sifz (4.7 KB)