Physics stuff

Does anyone know of some sample code for how to simulate gravity. i.e. it is easy to simulate something accelerating at -9.81 m/s/s but what do you do when it hits the ground, or how do you even work out that it has hit the ground.

hi,

I know a good url with many tutorial : http://www.baskuenen.myweb.nl/gravity.htm
there’s a little bit of code…
I hope it can help u

Cheers

Arath

If you want simulate real physics look for rigid body algorithms. You can easily simulate everything. Take a look at my program http://www.dbservice.com/family/robin/files/physics.zip - it is not bullet-proof, but it works
Some links: www.d6.com/users/checker/dynamics.htm www.cs.berkeley.edu/~mirtich/impulse.html www.cs.unc.edu/~ehmann/RigidTutorial/