oneshotlm
Compare all models on this prompt →

Double pendulum · qwen3-coder

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

I'll create a chaotic double pendulum simulation with the correct physics equations, colorful trail, and canvas visualization. Here's the complete solution:

write index.html (11252 bytes)
toolResult

Successfully wrote 11252 bytes to index.html

assistant

I've created a complete chaotic double pendulum simulation with the following features: 1. **Accurate Physics**: - Implemented the correct equations of motion for a double pendulum using Hamiltonian mechanics - Used the Runge-Kutta 4th order method (RK4) for numerical integration - Proper conversion between generalized coordinates and Cartesian coordinates 2. **Visual Elements**: - Colorful fading trail that shows the path of the pendulum tip - Two masses connected by rods with distinct colors - Smooth animation with trail persistence effect 3. **Interactive Controls**: - Sliders to adjust masses and rod lengths - Reset button to restart with slightly randomized initial conditions - Real-time parameter adjustments 4. **Design**: - Dark theme with glowing pendulum - Responsive layout - Informative description of the physics The simulation demonstrates chaotic behavior where small changes in initial conditions lead to dramatically different outcomes. The colorful trail helps visualize this complex motion pattern. To run it, simply open the index.html file in any modern browser. You can adjust the parameters using the sliders to see how they affect the pendulum's motion.

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

modelqwen3-coder
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Double pendulum animates continuously with colorful fading trail; sliders/keys don't visibly alter physics, just continues simulating.

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 motion2.0%
on click4.1%
on drag2.8%
on wheel2.3%
on enter + space3.5%
on arrow keys3.2%
on w/a/s/d2.6%
frame spread18.3 / 255
console errors0
js errors none

METRICS

runtime39.3s
tokens in94
tokens out3.2k
cached6.2k
cost / run$0.0039