Home▸Mathematics▸Principle of Least Action: Path Relaxation (2D)

Principle of Least Action: Path Relaxation (2D)

A 2D vertex-mesh companion to the 3D least-action gradient-descent solver: drag path nodes by hand, pan and zoom the plane, and watch a jagged trial trajectory relax directly on Hamilton's discretized action into the exact gravitational parabola, with no equation of motion hard-coded.

Mathematics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-mathematical-physics-physics ↗ Open standalone

A genuinely 2D-native companion to the 3D least-action solver: the same discretized-action gradient descent, the same Euler–Lagrange target curve, but the trial trajectory now lives directly on a pannable, zoomable plane instead of behind a 3D camera — and you can grab any interior node yourself and pin it wherever you like, watching the rest of the path relax around your own perturbation in real time. Mathematical physics rebuilds mechanics on a single idea: of all conceivable paths between two fixed events, nature follows the one that extremizes the action functional S[q] = ∫L dt. Here a trial path is chopped into free nodes, randomly perturbed into a jagged squiggle, and relaxed frame by frame via gradient descent directly on the discretized action, with no equation of motion hard-coded anywhere — watch it bow into the exact gravitational parabola predicted by ÿ = −g, with live readouts for the action value, gradient-step count, and RMS deviation from the closed-form exact solution.

⚙ Under the hood

A 2D vertex-mesh companion to the 3D least-action gradient-descent solver: drag path nodes by hand, pan and zoom the plane, and watch a jagged trial trajectory relax directly on Hamilton's discretized action into the exact gravitational parabola, with no equation of motion hard-coded.

least actioneuler-lagrangelagrangian mechanicsvariational calculusmathematical physics

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

What did you find?

Add reproduction steps (optional)