Skip to content

Interactive STEM simulation

Gravity Lab — N-Body Orbital Mechanics Simulator

Simulate gravitational n-body systems online: Earth-Moon, Sun-Earth, inner planets, binary stars, and escape trajectories. Adjust mass and velocity and track orbital energy live.

🌌
GRAVITY & ORBITAL MOTION LAB
SIMULATION CONTROLS

Moon orbiting Earth at 384,400 km

Zoom
Mass (kg):7.34e+22
Velocity X (m/s):0
Velocity Y (m/s):1022
Moon ORBITAL DATA
Distance:384.4K km
Velocity:1.02 km/s
Escape v:1.44 km/s
Circular v:1.02 km/s
SYSTEM ENERGY
Kinetic:38.34R J
Potential:-76.13R J
Total:-37.79R J

Community Feedback
0 Comments

Share Your Experience

Loading comments...

Gravity Lab — N-Body Orbital Mechanics Simulator

This gravity lab simulates real gravitational n-body systems using Newtonian mechanics with scenarios from the Earth-Moon system to binary stars and escape trajectories. Select any body to adjust its mass and velocity components with sliders, then watch orbit trails, velocity vectors, and optional gravity-well visualizations update in real time. A bottom panel plots kinetic and potential energy versus time and shows orbital data for the selected body, including distance, velocity, escape velocity, and circular orbital velocity.

What you can do in this simulation

  • Choose from 5 scenarios: Earth-Moon, Sun-Earth, Inner Planets, Binary Stars, Escape Trajectory
  • Select any body and adjust its mass (kg), Vx, and Vy with sliders
  • Toggle orbital trails, velocity vectors, and gravity-well visualizations
  • Control simulation speed from 0.1x to 5x
  • View live energy graph (kinetic and potential) for the selected body

Concepts covered

Newton's law of gravitation · orbital mechanics · escape velocity · n-body problem · gravitational potential energy · Kepler's laws

Related simulations

Browse all Physics simulations →

Related reading

Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.

Finished experimenting?

Save one completion to this browser's signed guest ledger, or directly to your account when signed in.