Fluid Dye Playground
Paint colored dye and push it through a fluid-like field for art and play. Explore the changing flow with pointer or keyboard controls, inspect the text summary and save what you make. The model is a stylized simulation with closed walls.
Your input
Brush
Dye color
Result
Dye field, 128 by 128 cells, step 0 (0.00 s of model time), paused. Dye shows in 6% of cells, most of it in the center; the most common dye color is lime, in 60% of dyed cells. Fastest flow 3.96 cells a step, heading up-right, in the middle right.
- Grid cells
- 16,384
- Model time
- 0.00 s (0 steps)
- State
- Paused, finite
- Timestep
- 1/60 s fixed
Save and export
Download PNG saves the field as it is now, smoothed to 1,024 by 1,024 pixels whatever the grid. The preset JSON holds the grid, dissipation, pressure iterations, seed and brush, and Open preset JSON reads one back and keeps the dye, resampled to the grid in the preset if it differs. Save snapshot pauses the field and keeps every value, the step count and the settings in this browser; it reopens paused on your next visit, and Restore snapshot brings it back at any time.
The field in numbers
Share of cells showing dye (brightest channel above 0.05) and the mean flow speed in each ninth of the field. The table follows the field a few times a second while it runs and after every step or stroke.
| Rows | Left | Center | Right |
|---|---|---|---|
| Top | 7% dye, 0.14 cells a step | 12% dye, 0.22 cells a step | 1% dye, 0.01 cells a step |
| Middle | 0% dye, 0.00 cells a step | 13% dye, 0.21 cells a step | 10% dye, 0.19 cells a step |
| Bottom | 0% dye, 0.00 cells a step | 8% dye, 0.16 cells a step | 0% dye, 0.00 cells a step |
Worked cases
Drag on the canvas to paint; on a touch screen, drag a finger. With a keyboard, Tab to the canvas, move the crosshair with the arrow keys (2 cells a press, 8 with Shift) and press Space or Enter to inject at it; with a force brush, the push goes the way you last moved. The Keyboard push buttons and Inject at crosshair do the same from outside the canvas. Painting works while the field runs or is paused, and on a device that asks for reduced motion the field opens paused.
Common questions
- How does this fluid simulator work?
- It keeps a square grid of cells with a velocity on each cell face and red, green and blue dye at each cell center. Each step moves the velocity and the dye along the flow by tracing back one timestep and reading the old field there (semi-Lagrangian advection), multiplies both by the dissipation, and runs your chosen number of Jacobi pressure iterations to remove part of the flow squeezing into or out of each cell. The edges are closed walls. It is stylized numerical art, not a calibrated physics model.
- What do dissipation, pressure iterations and grid size change?
- Dissipation below 1 fades dye and velocity a little each step. More pressure iterations reduce more of the flow squeezing into or out of cells, at the cost of more work per step. A larger grid shows finer detail and also takes more work. These controls change the numerical field; they are not physical viscosity, temperature or density settings.
- Can I use it with a keyboard or on a phone?
- Yes. The canvas supports touch and keyboard input. Its full keyboard instructions and separate push controls are listed beside the tool, and the regional table gives a text reading of the field.
- Can I save what I make?
- PNG and preset JSON files download to your device. Snapshots stay in this browser. Storage can be blocked or full; a 256-grid snapshot needs about 2 MB, and the page reports a refusal.
- Why does the dye blur and fade?
- Dissipation below 1 fades dye and motion on purpose, a little every step. Separately, each step reads the old field at points between cells and blends the four nearest values, which softens sharp edges a little every time, so fine detail slowly blurs even at a dissipation of 1. The total amount of dye is not kept exactly.
- Can I use this as a fluid dynamics or fluid mechanics simulator?
- You can explore a simplified two-dimensional model of incompressible flow by pushing dye through it. The model uses semi-Lagrangian advection and iterative pressure projection. It is not physically calibrated, and it does not conserve dye mass exactly. There are no viscosity, density, temperature, fire, ship or three-dimensional controls; do not use the display to design or predict real equipment.
- What does the seed do?
- The seed places the jets that Splash from seed adds: their positions, directions and colors all come from it, so the same seed on the same grid always makes the same splash, and without a saved snapshot the page opens with the splash from the current seed (3 until you change it). The simulation itself has no randomness: the same field, settings and strokes give the same numbers every time.
- Can I play with the fluid simulator on a PC without installing an app?
- Open the page in a browser that supports Float32Array buffers and a 2D canvas. The numerical field runs in JavaScript and the canvas displays it; no WebGL fluid engine is required. If motion is slow, choose a smaller grid or fewer pressure iterations, or use Pause and Step. Model time can run slower than the clock on a slow device.
- Does the fluid simulator have a game objective?
- It is an open-ended playground for painting, pushing and watching dye. There are no levels, points or car-repair tasks. Play starts the field moving; Pause and Step let you explore it one step at a time.
Stylized two-dimensional numerical art, not physically calibrated fluid dynamics, engineering design or exact mass conservation. Semi-Lagrangian advection and iterative projection introduce numerical diffusion; different GPUs can produce slightly different pixels.