I hope this is an easy question.
I want to animate a curve ball (as in baseball).
Is there a simple formula I can use for this?
For example, the ball starts at point 100,100 and moves to 100,0 with a nice curve toward 125,50.
Thanks,
Drew
I hope this is an easy question.
I want to animate a curve ball (as in baseball).
Is there a simple formula I can use for this?
For example, the ball starts at point 100,100 and moves to 100,0 with a nice curve toward 125,50.
Thanks,
Drew
A bezier curve for the path perhaps? Just duplicate the (125,50) point and use it for both control points if you’re determined to use a single control point. If you need more control then use both control points or start looking into the more complicated curves.
Beziers are a nice easy place to start though
Thanks!
I actually got this to work even though I don’t really understand the equation.
I’m doing the calculation on the fly. I wonder if it would be better for performance to map the entire path and store the x, y values in a table or something…
Actually, the performance is fine now, maybe it won’t matter.
BTW, are there built in methods in Java to do the Bezier equation that I’m not aware of?
Drew