oneshotlm
Compare all models on this prompt →

Fluid simulation · gpt-4.1-mini

Output generated Cost / run $0.0074 Runtime 45.7s

Prompt for this run

Create a real-time fluid simulation on a full-screen canvas where dragging the mouse pushes swirling colored dye through the fluid.

⛨ 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

runtime45.7s
tokens in5.8k
tokens out3.6k
cached2.2k
cost / run$0.0074
Transcript · 4 messages
user

Create a real-time fluid simulation on a full-screen canvas where dragging the mouse pushes swirling colored dye through the fluid.

assistant

Here's a self-contained html file for a real-time fluid simulation with swirling colored dye pushed by mouse drag on a fullscreen canvas. I use a simple stable fluid algorithm and visualize swirling dye colors. The mouse movement adds velocity and dye color at the pointer location. I will write the entire app into index.html now.

→ write index.html (8790 bytes)
toolResult

Successfully wrote 8790 bytes to index.html

assistant

I have created a fullscreen canvas fluid simulation in a self-contained index.html file with swirling colored dye driven by mouse dragging. The dye and fluid velocity evolve in real time, producing a visually swirling colorful effect. Open index.html in a modern browser to try it. Drag the mouse on the canvas to push swirling color through the fluid. Let me know if you want me to tweak parameters, add features, or explain the code!