oneshotlm
Compare all models on this prompt →

Fluid simulation · grok-4.6

Output generated Cost / run $0.0468 Runtime 60.5s

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

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

METRICS

runtime60.5s
tokens in8.0k
tokens out5.2k
cached256
cost / run$0.0468
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
thinking
The user wants me to create a real-time fluid simulation as a single-page web app in index.html. It should be a full-screen canvas where dragging the mouse pushes swirling colored dye through the flui...

I'll build a self-contained Navier–Stokes fluid sim on a full-screen canvas: mouse drag injects velocity and swirling RGB dye, all in one `index.html`.

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

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

assistant
thinking
The file was written successfully. Let me verify it exists and is complete. The user asked for a single self-contained index.html with no external resources - I've done that.

`index.html` is a full-screen, self-contained fluid sim (no CDNs or network). **What it does** - Stable Navier–Stokes on a grid (diffuse → project → advect) - Dragging injects velocity and RGB dye; hue shifts with motion so swirls stay colorful - Soft speed glow so vortices catch light - Dye slowly fades so the canvas doesn’t fill up **Controls** - Drag / touch to push dye - `R` reset - `Space` pause Open `index.html` in a browser and drag.