gak / gravit

A gravity simulator
http://gravit.slowchop.com/
GNU General Public License v2.0
66 stars 15 forks source link

new command: timestep #91

Open FrMo opened 11 years ago

FrMo commented 11 years ago

Adjusting G to control accuracy does not work with fixed physics any more; changing G usually causes the simulation to explode or implode.

We need a new command to do this: timestep (default =1.0). The timestep needs to be used twice when moving particles: velocity = old_vel + acceleration * timestep position = old_pos + velocity * timestep

(I actually have a piece of code to do this; will commit it after some cleanup)