oneshotlm
Compare all models on this prompt →

Double pendulum · grok-4.6

Output generated Cost / run $0.0532 Runtime 69.2s

Prompt for this run

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 ↗

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

modelgrok-4.6
vendorxAI · Grok
harnesspi-agent
generated2026-08-13

METRICS

runtime69.2s
tokens in8.8k
tokens out6.0k
cached384
cost / run$0.0532
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
thinking
The user wants me to create a single-page web app that simulates a chaotic double pendulum. Let me build a complete, self-contained index.html with:

I'll build a self-contained double-pendulum simulation with correct Lagrangian dynamics, RK4 integration, and a fading color trail.

→ write /tmp/ws/index.html (14488 bytes)
toolResult

Successfully wrote 14488 bytes to /tmp/ws/index.html

assistant
thinking
The file was written successfully. The user asked for a single-page web app simulating a chaotic double pendulum. I've created a complete self-contained index.html with:

`index.html` is a self-contained double pendulum: - **Dynamics** — Lagrangian EOM with angles from the downward vertical, integrated with RK4 at 240 Hz - **Visuals** — rods, mass-scaled bobs, and a hue-shifting fading trail of the outer tip - **Controls** — sliders for θ₁/θ₂, lengths, masses, g, and damping; drag the bobs; Pause / Reset / Perturb / Clear trail Open `index.html` in a browser to run it (no network needed).