What this is

A 3D N-body gravity sandbox. Real Newtonian gravity between every pair of bodies (with Plummer softening). Velocity Verlet integration for symplectic energy conservation. For N > 100 bodies it switches to Barnes-Hut octree (theta=0.7) for O(N log N) instead of O(N²). Click to spawn — left for planet, right for star, ctrl-click for black hole (warps spacetime via screen-space lensing distortion shader). Bodies have mass, velocity, color trails (~200 positions). Mass thresholds promote planets > 60 to stars, > 800 to black holes. Time scale slider from 0.01x to 1,000,000x. Press R for random 100-body cluster, O for stable orbit demo (star + planet + moon hierarchy), 1 for a 1000-body galactic disk that develops spiral arm density waves over time.

Why this is mind-blowing

Universe Sandbox is a $30 commercial game. The N-body gravity simulator at its heart is here in 1285 lines from one paragraph. The galactic disk slowly winding into spirals at 100,000x time scale is the kind of thing you can stare at for an hour.