Hi all,

Im trying to animate a particle in a way that it just curves.

If your familiar with beziers (im not) then you know that there is a start point, a control point and an end point.

I am finding it difficult to dynamically generate a good control point.

So a line starts at

x:0, y:0

and ends at

x:100, y:0

I know just from basic mathematics that i could find out the middle point:

x:50, y:0

Then i could just randomly specify a y value of say… 10. So my curve now looks something like this:

starts at {x:0, y:0}

control point at {x:50, y:10}

ends at {x:100, y:0}

This is simple on paper, but what about when things get more difficult. How can i possibly do the same thing with these vales:

starts as {x:0, y:0}

ends at {x:103, y:209}

It seems not only do i need to work out the middle point on a straight line, but i also need to find the perpendicular axis so i can add 10 to it.

Can anyone help me? Google search words would be great but an explaination even better!

Im trying to do it this way so i dont get “sharp” curves where 2 beziers meet.

Thanks!!