oneshotlm
Compare all models on this prompt →

Double pendulum · mistral-medium-3.1

Output generated Cost / run $0.0085 Runtime 30.5s

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

modelmistral-medium-3.1
vendorMistral AI
harnesspi-agent
generated2026-08-01

METRICS

runtime30.5s
tokens in6.6k
tokens out4.0k
cached5.9k
cost / run$0.0085
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 (12588 bytes)
toolResult

Successfully wrote 12588 bytes to index.html

assistant

Created a self-contained `index.html` file that simulates a chaotic double pendulum with: 1. **Physics**: Correct equations of motion using Runge-Kutta 4th order integration for accuracy 2. **Visualization**: - Two arms with different colors (green and blue) - Two bobs at the joints - A colorful fading trail that shows the chaotic path - Semi-transparent canvas clearing for smooth trail fading 3. **Controls**: - Start/Pause/Reset buttons - Toggle for the trail visibility - Real-time display of angles and system energy 4. **Styling**: Clean dark theme with responsive layout The simulation runs entirely client-side with no external dependencies. Open the file in any modern browser to see the chaotic behavior. The trail uses a rainbow color gradient that fades over time.