A simulation of chaotic motion using Lagrangian mechanics and Runge-Kutta integration
The double pendulum is a classic example of chaotic motion. Small changes in initial conditions lead to drastically different trajectories. This simulation uses the Lagrangian formulation to derive equations of motion, integrated with a 4th-order Runge-Kutta method for accuracy.
The trail shows the path of the second pendulum's tip, fading from recent (bright) to older (dim). Colors cycle through a hue spectrum based on position.