Work
Orbits
A gravitational N-body lab. Change the integrator and watch the energy drift, or fail to.
Press and drag to add a passing mass
- Energy drift
- 0.000%
- Total energy
- 0
- Steps
- 0
Notes
Five bodies under gravity, integrated in real time in the browser. The point is the comparison: symplectic integrators such as velocity Verlet keep the total energy bounded over millions of steps, while plain Euler bleeds energy until orbits spiral away. A readout tracks the drift live so you can see the difference rather than take it on faith. Drag on the canvas to add a passing mass and see the system react.
Built with
- TypeScript
- React Three Fiber
- Velocity Verlet