HomeMathematicsBrachistochrone Spectral Ritz Flow (2D)

Brachistochrone Spectral Ritz Flow (2D)

A 2D spectral counterpart to the brachistochrone gradient flow: the trial curve is built from Fourier sine modes, gradient descent shrinks their amplitudes toward the cycloid solution, and a live mode spectrum plus functional-value trace show the optimization directly -- no free-vertex mesh, no 3D camera.

Mathematics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-calculus-of-variations-brachistochrone ↗ Open standalone

A genuinely 2D-native companion to the vertex-mesh brachistochrone gradient flow: the trial path is a Fourier sine series with a handful of free coefficients instead of dozens of free points, so gradient descent operates directly in mode space. The canvas shows three linked views at once — the reconstructed curve against the analytic cycloid, a live bar chart of the mode spectrum shrinking toward the cycloid's own Fourier projection, and a running trace of the descent-time functional converging onto its known closed-form floor — turning the abstract idea of a truncated basis expansion into something you can watch settle.

⚙ Under the hood

A 2D spectral counterpart to the brachistochrone gradient flow: the trial curve is built from a truncated Fourier sine series, gradient descent shrinks the mode coefficients toward the cycloid solution, and a live mode-spectrum bar chart plus a functional-value trace show the Ritz-method optimization directly on canvas -- no free-vertex mesh, no 3D camera.

calculus of variationsbrachistochroneFourier seriesRitz methodgradient descentEuler-Lagrangenumerical optimization

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

What did you find?

Add reproduction steps (optional)