stefano-meschiari / SAVE-Point

A web-based platform for interactive, gamified astronomical education
http://save-point.herokuapp.com
9 stars 3 forks source link

Use Keplerian orbital calculation #2

Closed stefano-meschiari closed 10 years ago

stefano-meschiari commented 10 years ago

For systems without planet-planet interactions, use Keplerian orbital elements to compute cartesian coordinates of the planets — cuts down on calculations, enables fixed time steps, avoids precession for highly eccentric objects and makes it easier to detect collisions with the central star.

stefano-meschiari commented 10 years ago

Ended up keeping leapfrog for simplicity's sake — using Kepler's equation does not save a lot of computational time (if at all), and now that collisions are detected, there is no need for variable-step integration.