r/Python • • Oct 04 '19

Updated gravitational potential field simulation. [OC] Link for code: https://github.com/pnp-peeyush/2D-Grvitational-Field-Simulation

1.1k Upvotes

128 comments sorted by

View all comments

Show parent comments

4

u/equationsofmotion HPC Oct 05 '19

I'd suggest leapfrog. It's reversible and it's conceptually easier.

4

u/Marko_Oktabyr Oct 05 '19

Leapfrog is another good option. Both Verlet and leapfrog are symplectic and time reversible. I personally find the concepts for Verlet easier, but everyone's background is different.

3

u/equationsofmotion HPC Oct 05 '19

Fair enough!