Double pendulum · glm-5.3
Simulate a chaotic double pendulum on a canvas using the correct equations of motion, drawing the arms and a colorful fading trail of the tip.
transcript · 4 messages
Simulate a chaotic double pendulum on a canvas using the correct equations of motion, drawing the arms and a colorful fading trail of the tip.
index.html (4414 bytes)Successfully wrote 4414 bytes to index.html
Done — `index.html` contains the complete simulation: - **Physics**: exact double-pendulum equations of motion (standard point-mass Lagrangian form) integrated with 4th-order Runge–Kutta at 240 Hz substeps, so energy stays near-conserved (displayed in the HUD). - **Rendering**: canvas arms with two bobs, plus a ~900-point fading trail of the tip drawn with a cycling rainbow hue, thickness and alpha growing toward the newest point, over a slow-fading background. - **Interaction**: click anywhere to kick the tip toward the cursor, press `r` to reset with new random initial angles, resizes with the window.
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.
RUN
EVALUATION
Double pendulum simulates with correct chaotic motion and colorful fading trail; click/wheel perturb energy, all inputs affect trajectory.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.