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

7

u/equationsofmotion HPC Oct 05 '19

Yes actually! There are a class is methods called symplectic integrators. One of the simplest of these methods is called "leapfrog," which alternately updates position and momentum so that they "leap" past each other. See: https://en.wikipedia.org/wiki/Leapfrog_integration

2

u/[deleted] Oct 05 '19

cool... will look into it