🧪 Gravitational Integrators: Symplectic vs Euler Energy Drift (2D)
2D n-body lab that runs the same gravitational system through three real integrators at once — forward Euler, symplectic Euler and velocity Verlet — so you can watch which ones conserve energy and which ones blow up as you push the timestep.
This 2D companion to the 3D N-body sandbox isn't about rendering more bodies — it puts three real numerical integrators side by side on the identical gravitational system (same masses, same starting positions and velocities, same pairwise 1/r² force law) and lets you watch, in real time, which ones conserve energy and which ones don't. Forward Euler visibly spirals outward and gains energy; symplectic (semi-implicit) Euler — the method the 3D version itself uses — keeps energy oscillating in a bounded band; velocity Verlet (leapfrog) holds the tightest band of all. A timestep slider lets you push all three into instability and read the exact percentage drift live, turning an abstract numerical-methods concept into something you can literally watch happen.
2D n-body lab that runs the same gravitational system through three real integrators at once — forward Euler, symplectic Euler and velocity Verlet — so you can watch which ones conserve energy and which ones blow up as you push the timestep.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install