How to play
Every body attracts every other body by Newton's law of gravitation. Launch
planets, drop in whole scenarios, and watch orbits, collisions and slingshots
play out.
Mouse & trackpad
-
Click: add a planet (in a circular orbit when
Tap = circular orbit is on)
-
Click, pull back & release: launch it like a
slingshot
-
Click a body: inspect it (mass, speed, orbit) and
follow or delete it
- Wheel / pinch: zoom around the cursor
-
Right-drag, middle-drag or
Shift-drag: pan
Touch
-
Tap: add a planet (in a circular orbit when
Tap = circular orbit is on)
-
Tap, pull back & release: launch it like a
slingshot
-
Tap a body: inspect it (mass, speed, orbit) and follow
or delete it
- Two fingers: pan, and pinch to zoom
Toolbar
- ↻: restart the scenario, with its settings reset
-
Scenario button (its icon shows the one running): start a
different scenario
-
Add button (with the +): choose what you add, from a planet
or a star up to a whole galaxy
- Dice: a random scenario with random settings
- Trash: remove every body
Keyboard
- A
- Sound on / off
- D
- Random scenario and settings
- Space
- Pause / resume
- . or N
- Step once
- P S
- Add a planet / add the next thing in the list
- 1–9, 0
- Load a scenario
- R
- Fit view
- F
- Cycle camera follow
- + -
- Zoom
- [ ]
- Slower / faster
- C
- Remove all bodies
- G
- Show / hide settings
- V
- Start / stop recording (video and GIF)
- L
- Copy a share link
- Delete
- Delete the selected body
- Esc
- Cancel aiming / deselect
Under the hood
Choose between Euler, leapfrog (Verlet), Yoshida 4th-order and Runge–Kutta 4
integrators, and exact O(n²) gravity or the Barnes–Hut O(n log n) approximation.
Adaptive substeps automatically shrink the time step during close encounters.
The ΔE readout shows how well energy is conserved. Physics runs in
background threads, using every spare CPU core for big systems, and bodies are
drawn with WebGL, so tens of thousands of bodies stay smooth.
Source on GitHub