oneshotlm
Compare all models on this prompt →

Double pendulum · kat-coder-pro-v2

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 · 6 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 double pendulum simulation with realistic physics, canvas rendering, and a colorful fading trail. Let me build this step by step.

write index.html (14832 bytes)
toolResult

Successfully wrote 14832 bytes to index.html

assistant
bash {"command":"ls -la index.html"}
toolResult

-rw-r--r-- 1 node node 14832 Jul 31 08:47 index.html

assistant

Done! I've created a single-page web app (`index.html`) that simulates a chaotic double pendulum with: **Features:** - **Accurate physics**: Uses the full equations of motion for a double pendulum, integrated with 4th-order Runge-Kutta for stability - **Colorful fading trail**: The tip of the second pendulum draws a rainbow trail that fades over time - **Interactive controls**: Adjust lengths, masses, and gravity in real-time - **Drag to set angles**: Click and drag either bob to set initial conditions - **Responsive design**: Works on desktop and mobile (touch support) **How to use:** - Open `index.html` in any modern browser - Drag the blue or pink bobs to set initial angles - Use sliders to change pendulum parameters - Click "Reset Pendulum" to restart with default angles - Watch the chaotic motion unfold! The simulation uses the standard Lagrangian mechanics equations for a double pendulum. The trail fades smoothly and changes color based on position, creating beautiful patterns that highlight the chaotic nature of the system.

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

modelkat-coder-pro-v2
vendorKwaipilot
harnesspi-agent
generated2026-07-31

EVALUATION

4/5 working

Smooth chaotic double pendulum with colorful fading trail; animates continuously though keyboard/mouse inputs don't add distinct controls.

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.2%
on click2.5%
on drag2.0%
on wheel1.8%
on enter + space1.6%
on arrow keys1.7%
on w/a/s/d2.6%
frame spread18.8 / 255
console errors0
js errors none

METRICS

runtime55.4s
tokens in14k
tokens out4.5k
cached6.1k
cost / run$0.0082