Hi,
I'm trying to implement an anim curve interpolation based on the
bezier algorithm.
So if I have 4 points, P0, P1, P2 and P3.. every point has a x and y
value..
P1 is the right tangent to P0, and P3 is the left tangent to P2.
t is a continuous value between 0 and 1.
I'm currently using t as my x value.
I then have a function which gets my y value like this:
a = 1-t
y = t^3.P0y + 3.t^2.a.P1y + 3.t.a^2.P2y + a^3.P3y
It works the way I want, because it is close to bezier, but is a one
to one function..
But I'm not sure if this is the best way of doing this.
Thanks in advance.


|