A grid of a few hundred cells a side holds a velocity field; a finer grid holds the dye. Every frame each field is carried along by the velocity (semi-Lagrangian advection, after Jos Stam), small swirls are re-sharpened (vorticity confinement), smoke rises by its density, and then a pressure field is relaxed for a couple of dozen Jacobi steps and subtracted, so the fluid neither piles up nor thins out. Walls are a mask the pressure solver treats as solid.
Mouse and touch
- drag
- smoke mode: push the fluid and pour dye; each stroke takes the next colour
- tap
- one puff
- drag
- wall mode: draw walls · erase mode: rub them out
Keys
- 1–4
- scenes: Schornsteine, Tinte, Windkanal, Wirbel
- M
- mode: smoke, wall, erase
- W
- wind: off, from the left, from the right
- B
- buoyancy on or off
- V
- vorticity 0, 10, 30
- P
- palette: Nacht, Ember, Frost, Ink
- R
- clear smoke and motion, keep walls
- C
- clear all walls
- space
- pause or resume
- S
- copy a link to these settings
- H ?
- this help · Esc closes it
The link holds the scene, palette, wind, buoyancy and vorticity, not the walls you drew or the smoke itself: those are too big for an address. ?seed= fixes the chimneys, obstacles and colour order. Changing the scene restores its own walls.