Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Razza2003

Projectile Simulation Formula

This topic is 5673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, would somebody be able to help me find a math formula so I can work out the path of a travelling bullet/missle, from a tank. Ive been trying but it wasn't accuracte. I need it to be able to be affected by the projectiles weight, gravity, wind, etc. If anyone can help it would be greatly appreciated. Thx for anyhelp you can provide . [edited by - Razza2003 on March 4, 2003 2:45:37 AM]

Share this post


Link to post
Share on other sites
Advertisement
well the formulas are independant of weight

heres a simple one for working out the x and y positions of the projectile(doesnt include wind)

if you fire a projectile with some initial velocity at some angle.. then you can calculate the x and y position of it like this

1st you need the x and y components of the initial velocity

vx = velocity*cos(angle)
vy = velocity*sin(angle)

at any time t the x and y positions of it will be

x=(initial x velocity)*time

y=(initial y velocity)*time+0.5*gravity*(time)^2

those formula will give you the position at any given time..

an easy way to add wind would be too add an acceleration term onto the x position

x=vx*time + 0.5*(acceleration due to wind)*time^2

make the acceleration negative or positive depending on the wind direction.. but be careful not to make it too big.. or you will end up with particles flying all over the place! 0_o

If you simple want air resistence.. then u could use a similar equation as for wind.. but you will need to make the acceleration of it velocity dependant(because things that arnt moving dont experience air resistance).. which means you will have to continuosly calculate its velocity.. but the equation would look something like this

x=vx*time + 0.5*(acc of air*(current velocity))*time^2



[edited by - quant on March 4, 2003 12:14:34 PM]

Share this post


Link to post
Share on other sites
Weight do depend. A table-tennis ball behaves diffrently compared to a iron ball of the same size.

But, if you''d care about the weight you''d probably be so picky about the physics that you''d never finnish the physics-code for the ball :-)

Share this post


Link to post
Share on other sites
Weight doesnt effect the motion of the ball at all

Everything falls to earth at the same speed

Share this post


Link to post
Share on other sites
If the shape of the object is the same, the wind resistance force is the same... If the mass of the object is greater, the gravitational force is larger.

Sum those forces, then divide by the object''s mass, and the more dense object will have a greater downward acceleration.

Share this post


Link to post
Share on other sites
assume for one minute that there is no wind resistance or anything.. just gravity

Newtons 2nd law

F=ma

Law of gravity

F=G*M*m/r^2

where M is the mass of the earth.. m is the object falling to the earth

ma=G*M*m/r^2

m''s cancel

a=G*M/r^2

simple physics really.. everything falls at the same speed

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
well air resistance is generally mass independant also..

although more massive objects take longer to reach terminal velocity.. and so would fall faster than less massive objects

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
well air resistance is generally mass independant also..

Mass independant? I've learned and read that it's proportionnal to speed (sometimes squared) and there is a friction coefficient, which depends on the shape of the object and the turbulence that it causes in the air.

Cédric

EDIT; Correction: The force caused by air resistance is mass independant, but the acceleration it creates isn't, whereas the gravity force is mass dependendant, but its acceleration isn't.

[edited by - cedricl on March 7, 2003 11:47:02 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!