Wheel = zoom. Left mouse uses the chosen tool, right mouse pushes, Shift+drag always launches. Keys: Space pause, R reset.
Newtonian gravity with G = 1 (arbitrary units): a_i = sum_j G m_j (r_j - r_i) / (|r_j - r_i|^2 + e^2)^(3/2), where e is the softening length that stops the force blowing up at zero distance.
Integrator: kick-drift-kick leapfrog (symplectic, time-reversible, second order). Energy only oscillates instead of drifting, which is why orbits close properly.
Conserved totals shown live: E = sum m v^2/2 - sum_(i<j) G m_i m_j / sqrt(r_ij^2+e^2), momentum P = sum m v, angular momentum L = sum m (x v_y - y v_x).
Circular orbit speed v = sqrt(G M / r); Kepler's third law T = 2 pi sqrt(a^3 / (G (M+m))); escape speed sqrt(2 G M / r).
Honest simplifications: dust grains are massless test particles (they feel the bodies but do not pull on them); bodies are point masses that pass through each other (no collisions); the mouse mass is an external force, so it breaks energy and momentum conservation while pressed, and the baseline is reset on release. Dust that reaches a body or flies far away is respawned in a fresh orbit.
Independent checks (run in your browser, no rendering involved):