On Fri, 2003-11-07 at 03:54, Kampon Tangwaritorn wrote: > If I want to simulates projectile motion using Java3D.
On Fri, 2003-11-07 at 08:46, P. Flavin wrote: > Projectiles follow a parabolic path : y = a*x^2 + b*x + c; I think you'll need more than just the generic formula for a parabola. To get realistic looking projectiles I suggest using the laws of physics. It is these laws after all that projectiles in the real world obey. It isn't actually all that difficult to get a realistic basic simulation. You will probably need at least two formula, one to calculate the horizontal distance the projectile has gone, and a second to calculate its vertical height. Horizontal component of velocity is constant, but the vertical component is effected by gravity. Of course that is a simplified model, you can make it as complicated as you like taking into account wind resistance and other such forces. Pythagoras's formula can be used to convert the force vector (i.e. launch angle and velocity) into it's horizontal and vertical components which you can then plug into the aforementioned physics formula. I don't have any great links on hand - try searching either in physics text books or Google. One site I found (just then) which may useful is this one: http://www.geocities.com/Colosseum/8682/physics.htm it talks about physics in relation to athletes in this case the javelin throw which is ballistic. Actually, I did a quick search myself and turned up a good one: http://physicsstudio.indstate.edu/java/newtmech/m_hproj_h.html the first two formula are the ones I am talking about. Just google for "Projectile Motion" and "physics" if you need more examples. Cheers, Will. http://tankammo.com/ =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".