Fluid simulation · nova-2-lite-v1
Output generated Cost / run $0.0254 Runtime 173.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.
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
METRICS
Transcript · 5 messages
Create a real-time fluid simulation on a full-screen canvas where dragging the mouse pushes swirling colored dye through the fluid.
thinking
[REDACTED]
thinking
[REDACTED].
index.html (13795 bytes)Successfully wrote 13795 bytes to index.html
thinking
[REDACTED].
I've created a complete fluid simulation in a single HTML file! The simulation features: 1. Full-screen canvas that fills the browser window 2. Real-time fluid dynamics with mouse interaction 3. Colored dye that swirls through the fluid 4. Physics-based movement with viscosity and diffusion 5. Mouse-drag interaction that pushes and swirls the fluid 6. Reset button to clear the simulation To use the simulation: 1. Open the `index.html` file in any modern browser 2. Click and drag anywhere on the canvas to push the colored dye 3. The fluid will naturally swirl and diffuse over time 4. Use the "Reset Simulation" button to clear the screen and start over The simulation uses a grid-based fluid dynamics approach with: - Velocity fields for fluid movement - Dye concentration that follows the flow - Mouse interaction that applies directional forces - Natural diffusion and viscosity effects - Color gradients based on dye concentration The fluid responds realistically to your mouse movements, creating swirling patterns as you push the dyed fluid through the simulation space.