This is a phase-space companion to the 3D double-pendulum scene elsewhere on the site — it does not render an orbiting camera or a bundle of divergent trails. Instead the small panel at the top is just a reference view of the arm; the real content is the large plot below it, which is where the chaos actually shows up as geometry.
The pendulum itself is the standard two-mass, two-rod Lagrangian system, integrated with 4th-order Runge–Kutta at a fixed 1/240s step (far tighter than the semi-implicit Euler used for real-time rendering, so the total mechanical energy stays visibly flat unless you push the sliders into a stiffer regime).
- Trajectory mode plots the instantaneous state — angle vs. angular velocity of either arm — as a fading curve. For a simple pendulum this closed loop would be an ellipse; here it fills space, which is itself a signature of chaotic motion.
- Poincaré mode instead samples the state only every time the first arm swings back through vertical with positive velocity (θ1=0, ω1>0), and keeps every sampled point on screen. A regular (non-chaotic) system would return to the same few points; this system scatters them across a whole region — the hallmark of a chaotic attractor.
- Energy drift is a numerical-accuracy check, not a physics knob: because gravity is conservative, a perfect integrator would hold total energy exactly constant. Watching the drift stay near zero is a live confirmation that RK4 is tracking the true trajectory rather than an artifact of the solver.