A simulation of deterministic chaos using Lagrangian mechanics. Tiny changes in initial conditions lead to vastly different trajectories.
The double pendulum is a classic example of a chaotic system. Despite being governed by deterministic equations of motion, its behavior is highly sensitive to initial conditions—a hallmark of chaos.
This simulation uses Lagrangian mechanics to derive the equations of motion and solves them numerically using a 4th-order Runge-Kutta integration scheme.
The colorful trail behind the second bob shows its recent path, with colors indicating speed (blue = slow, red = fast) or selected color scheme.
Try changing parameters slightly and observe how the motion diverges dramatically over time!