Integrator Race: Euler vs Verlet vs RK4
Watch four numerical integrators — Explicit Euler, Symplectic Euler, Velocity Verlet and RK4 — step the same orbiting body under the same gravity, from the same start, and diverge live as their energy drifts.
Four identical bodies are launched into the same elliptical orbit around the same central mass, each advanced by a different numerical integrator — Explicit Euler, Symplectic (semi-implicit) Euler, Velocity Verlet and RK4 — using the same shared step size. Because Newton's laws are differential equations with no closed-form solution for most real scenarios, every physics or orbital-mechanics engine has to pick one of these stepping schemes, and the choice matters: explicit Euler visibly spirals outward as it leaks energy every step, the two symplectic methods keep a stable closed ellipse even at a coarse step size, and RK4 trades symplecticity for high per-step accuracy. Live energy-drift readouts per integrator, a shared Δt/gravity/eccentricity control set, and per-body trails make the divergence easy to see and reason about.
Four identical bodies orbit the same gravity well, each stepped by a different numerical integrator (Explicit Euler, Symplectic Euler, Velocity Verlet, RK4) from the same starting state, with live energy-drift readouts showing exactly how each method diverges.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install