Home▸Computer Science▸Computational Physics Simulator (2D)

🪐 Computational Physics Simulator (2D)

Compare Euler, semi-implicit Euler and RK4 numerical integrators on a 2D two-body orbit and watch integration error accumulate as orbital drift and energy loss.

Computer Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-computer-science ↗ Open standalone

This 2D companion runs the exact same planar two-body gravity equations as the 3D version on a flat top-down canvas: pick Euler, semi-implicit Euler or RK4 and watch the same orbit either spiral away from the star (plain Euler leaking energy) or trace a stable closed ellipse (the symplectic and RK4 methods), with a live energy-drift readout making the accuracy difference numeric instead of just visual.

⚙ Under the hood

Compare Euler, semi-implicit Euler and RK4 numerical integrators on a 2D two-body orbit and watch integration error accumulate as orbital drift and energy loss.

computational physicsnumerical integrationorbital mechanicsRK4canvas 2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)