oneshotlm
Compare all models on this prompt →

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.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

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.

assistant
write index.html (4414 bytes)
toolResult

Successfully wrote 4414 bytes to index.html

assistant

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

modelglm-5.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

EVALUATION

4/5 working

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.

idle motion6.8%
on click14.1%
on drag12.2%
on wheel9.3%
on enter + space10.5%
on arrow keys8.4%
on w/a/s/d9.7%
frame spread22.8 / 255
console errors0
js errors none

METRICS

runtime24.3s
tokens in4.6k
tokens out1.8k
cached2.8k
cost / run$0.0114