# Wind Drift Field

**Group:** 3D and WebGL scenes  
**Recording:** [https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/wind-drift-field.mp4](https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/wind-drift-field.mp4)  
**Source:** [https://ui.aryank.space/components/wind-drift-field](https://ui.aryank.space/components/wind-drift-field)  
**Human:** https://blankinterfaces.com/lab/wind-drift-field

---

## What it is

Still air you stir with the pointer, running on a real fluid solver rather than a painted force field. Fourteen thousand tracers ride the velocity field and leave trails that fade back into the paper, and every trail is coloured by the speed of the air carrying it, so a slow eddy stays green and a hard sweep burns red. The air is a Stable Fluids grid and the three steps in its loop are what make it read as wind rather than as blobs. Self-advection carries the velocity field along itself, so momentum keeps travelling after your hand stops and a stroke moves downstream and stretches instead of sitting where you drew it. Pressure projection solves a Poisson equation each frame and subtracts the gradient to remove divergence, which is the step that makes air behave like air: without it velocity is created and destroyed in place, which is exactly what a stamped gust looks like, and with it the air pushed out of one place has to go somewhere, so a stroke rolls up into vortices at its ends and the flow curves around itself. Vorticity confinement puts back the small swirls the solver own interpolation smears away, and its gain is capped at half the energy viscosity removes, so a wake stays turbulent without the field ever churning forever. Nothing moves on its own: with the air at rest a tracer draws a zero-length segment and the buffer keeps fading, so the surface sits empty until it is touched, and once the kinetic energy decays the loop parks itself on a cleanly cleared buffer rather than on the residue an eight bit fade can never round away. The trail is a ping-pong pair of framebuffers, so it is never stored as history, only as what is left of the last frame. One WebGL canvas, no library and no asset required.

## Behaviour

### Projection is what makes it air

A gust painted straight into a velocity field has divergence: air appears in one cell and vanishes in another, which the eye reads instantly as a stamp rather than a flow. Solving each frame for the pressure whose gradient cancels that divergence, then subtracting it, forces air pushed out of one place to go somewhere. That single step is the difference between blobs and a stroke that rolls up into vortices at its ends.

### Momentum outlives the gesture

The velocity field is advected along itself, so a stroke keeps travelling and stretching after the pointer has stopped. Nothing replays the pointer path; what you see a second later is where the air it moved has since got to.

### Turbulence cannot outrun the damping

Vorticity confinement adds energy on purpose, to feed back the small swirls advection smears away. Left free it adds more than viscosity removes and the field churns forever, which is exactly what happened at first. The gain is capped at half the damping headroom, so coming to rest is a property of the solver rather than a lucky pair of constants.

### Colour is the air speed, not decoration

Each segment is tinted by the speed of the flow that drew it, walked along the ramp on speed rather than speed squared so the low end is not crushed into one colour. A drifting eddy comes out green and a fast sweep saturates to red, so the palette is reading the simulation rather than sitting on top of it.

### The loop parks itself, on a clean surface

Once the kinetic energy decays past a threshold there is nothing left to compute, so the frame callback coasts four seconds to let the trails clear and then stops. It hard-clears both buffers on the way out: an eight bit fade that mixes seven percent toward the background can never round the last level away, so parking without that clear would freeze faint residue on screen forever.

### Fixed step, by choice

Semi-Lagrangian advection is stable at any step size, so a variable delta would not blow up, it would just make a stroke travel a different distance per frame on every machine. The solver runs on a fixed 30fps step so the flow looks the same everywhere.

---

[View all content](https://blankinterfaces.com/sitemap.md)
