oneshotlm
Compare all models on this prompt →

Double pendulum · gpt-4.1-mini

Output generated Cost / run $0.0039 Runtime 25.0s

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

modelgpt-4.1-mini
vendorOpenAI
harnesspi-agent
generated2026-08-01

METRICS

runtime25.0s
tokens in3.9k
tokens out1.7k
cached1.2k
cost / run$0.0039
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 single-page web app with a canvas that simulates a chaotic double pendulum using the exact equations of motion. The pendulum arms will be drawn, and the tip will leave a colorful fading trail. The code will be self-contained within index.html. Starting now.

→ write index.html (3946 bytes)
toolResult

Successfully wrote 3946 bytes to index.html

assistant

I created the file index.html with a self-contained chaotic double pendulum simulation. It uses the correct equations of motion with Runge-Kutta integration, draws the pendulum arms and bobs, and leaves a colorful fading trail from the tip. You can open index.html in a browser to see the simulation. If you want me to improve or add any features, just ask!