Vanderbei’s applications · Princeton University

Gravity Simulator

Explore the motion of Earth and Moon under mutual gravity. Change their starting positions and velocities, then follow the orbit one step at a time.

Simulation

Loading Python…
  • Earth
  • Moon
Step
—
Simulated time
—
Initial conditions
Earth
Moon

The time step is 0.03 in the original simulator’s units.

Loading the simulation engine…