Gravity & Orbits
Throw planets, slingshot a probe past Jupiter and tear apart star disks: real orbits under Newton's law of gravity.
This is real Newtonian gravity, not an animation: an adaptive-step leapfrog integrator follows every body and slows time automatically during close passes, so energy stays conserved. Pick a scene, rotate it in 3D, or throw your own planets and read their orbits in real units.
Drag to rotate · pinch or Ctrl + scroll to zoom · tap a body to read its orbit
Close encounter
Two stars with dusty disks swing past each other. The disk that spins the same way as the encounter is torn into a bridge and a long tidal tail; the one spinning backwards barely notices. Toomre & Toomre used exactly this method in 1972 to explain colliding galaxies.
Selected body
Everything has merged or escaped. Press reset to start again.
- Bodies
- 0
- Energy drift
- 0 %
Change in total energy since the last merger or throw. A good integrator keeps this tiny.
Constants & sources
- G = 4π² AU³·M☉⁻¹·yr⁻² · 1 AU/yr = 4.740 km/s
- Standish, JPL — planetary elements (1800–2050)
- Akeson et al. 2021, AJ 162, 14 — α Cen AB
- Chenciner & Montgomery 2000 — figure-eight
- Toomre & Toomre 1972, ApJ 178, 623 — tidal tails
The units and constants behind these orbits
This simulation does not work in metres and kilograms — it works in astronomical units, solar masses and years, because that is what keeps the numbers human-sized. Here is what each one is worth in SI.
What you are changing
The constant in the law
- G = 6.67430 × 10⁻¹¹ m³ kg⁻¹ s⁻² Newtonian constant of gravitation · the least precisely known of the fundamental constants
What this simulation's units are worth in SI
| Unit | In SI | Where it comes from |
|---|---|---|
| 1 AU | 149,597,870.7 km | Defined exactly since 2012 (IAU) — originally the mean Earth–Sun distance |
| 1 M☉ | 1.98841 × 10^30 kg | Mass of the Sun; the Solar System's natural mass yardstick |
| 1 M⊕ | 5.9722 × 10^24 kg | Mass of the Earth, for comparison — the Sun is about 333,000 times heavier |
| 1 yr | 365.25 days | The Julian year used in astronomy, not the calendar year |
Values come from the same constants the simulation integrates with (lib/physics/gravityOrbits.ts), so what you see here is what it actually computes.
The constant we know worst
Every value in this simulation rests on G = 6.67430 × 10⁻¹¹ m³ kg⁻¹ s⁻². Its standard uncertainty is ±1.5 × 10⁻¹⁵, about 22 parts per million — thousands of times worse than the speed of light or the Planck constant, which are exact by definition. Gravity is the force we can least precisely measure.
Compare it with the other constants and their uncertainties →