Placing Bodies
Select a preset from the grid on the left (Earth, Sun, Black Hole, etc.) or leave it blank for a custom body.
Adjust Mass, Size, and Color, then click + PLACE or click anywhere on the
simulation canvas. Without a preset selected, bodies are named Body 1, Body 2, etc.
Velocity Arrow
When placing, click and drag on the canvas to set an initial velocity.
The longer the drag, the faster the launch. Release to place the body.
Top Bar Controls
| ⏸ / ▶ Pause/Play | Freeze or resume the simulation. |
| ⏩ Speed slider | Simulation speed multiplier. A warning appears above 50×. |
| 🔁 Reverse | Run physics backwards in time. |
| 🎯 Lock On | Locks the camera to follow the selected body. Press Esc or click Unlock to release. |
| 💾 Save / 📂 Load | Export or import the full scenario as a JSON file. |
Keyboard Shortcuts
C center on origin
Esc deselect / exit mode
? toggle this help
Orbit Controls
| Left drag | Rotate the camera around the target point. |
| Right drag | Pan the camera (shift the target point). |
| Scroll wheel | Zoom in/out toward the cursor position — the view re-centres on wherever you scroll. |
Camera Modes
| ⊕ Center on Origin | Snap the camera back to (0, 0, 0). Also press C. |
| 🎯 Lock On | Select a body in the list, then click Lock On in the top bar. Camera follows that body continuously. |
| Lock Camera to CoM | Camera follows the system's centre of mass. Useful for multi-body systems. |
| Follow (per-body) | Click the green FOL button next to any body in the list. |
Tips
Zoom-to-cursor means you can zoom into any body without manually panning first — just hover over it and scroll.
Body List (left panel)
Every placed body appears in the list. Click a body name to select it (highlights in the scene).
Selected bodies can be renamed by double-clicking their name in the list.
| THR button | Select body and open Thrust panel for WASD flight control. |
| FOL button | Lock camera to follow that body. |
| DEL button | Remove the body from the simulation. |
Presets
The 12 preset tiles (Asteroid → Black Hole) set mass, radius, colour, and density tag automatically.
You can then override Mass and Size before placing. The preset name is used as the body's default label.
Collisions
When two bodies overlap they merge — momentum is fully conserved. The merged body inherits the heavier
body's name with the smaller one appended (e.g. Sun+Earth).
Impulse Cannon
Click 💥 CANNON in the Place Body section. Click a launch point, drag to aim, release to fire.
Useful for perturbing existing orbits.
Integrator
The simulation uses a symplectic leapfrog (Velocity-Verlet) integrator — this conserves energy
over long periods so orbits stay stable indefinitely. Euler or RK4 would slowly gain or lose energy.
Thrust Mode (WASD)
Select a body, click THR next to it, and use keyboard controls to apply thrust each physics step:
W / S accelerate / brake
A / D strafe left / right
Q / E up / down
Presets — Orbital Scenarios
| Binary Stars | Two equal-mass stars in a stable mutual orbit. |
| Solar System | Sun + scaled rocky and gas planets in circular orbits. |
| Figure-8 | Three equal-mass bodies in the stable figure-8 choreography. |
| Hohmann Transfer | A ship executes a two-burn transfer from an inner to outer orbit. |
| Lagrange Points | Sun + Jupiter + trojan asteroids at L4/L5 stable points. |
Energy Display
The overlay (bottom-right) shows body count, centre of mass, FPS, and energy drift percentage.
For stable orbits, drift should stay near 0%.
Gravitational Well Grid
The simulation grid is also a live gravitational potential surface — it deforms downward under massive
bodies. A black hole creates a sharp spike. Use the sliders to adjust:
| Well Detail | How far from a body the grid deforms. Higher = larger wells, more GPU work. |
| Grid Brightness | Opacity/brightness of all grid lines (goes above 100% to fully saturate). |
| Grid Frequency | Spacing of grid lines — slide right for a finer, denser grid. |
Vectors & Labels
| Vectors | Toggle velocity (cyan) and acceleration (orange) arrows on all bodies. |
| Labels | Toggle floating name labels above each body. |
| Trails | Toggle orbital path trails. Trail length is controlled by the Trail Length slider. |
| Grav Well | Toggle the grid displacement effect on/off. |
Scenario Recorder
Click ⏺ Record to start capturing frames, ⏹ Stop to finish.
Use the playback slider to scrub through the recording or press ▶ Play to replay.