Flow fields
The field is a map of currents. The strokes are the paths.
The rule
A flow field is a map of directions: at every point of the canvas, an arrow says where to go. The map itself is not drawn, it is followed. A particle is dropped somewhere, reads the angle of the field where it stands, moves a small step in that direction, reads the angle again, and so on. The trail it leaves is the drawing.
x ← x + step · cos(angle), y ← y + step · sin(angle), the angle being read from the field at (x, y)
All the character of the piece therefore lives in the field. Two kinds of fields come back: a trigonometric formula, where sines and cosines at different scales interfere, or noise, a random but gentle variation with no sudden angle. Two neighbouring particles get almost the same direction: their trails go together, bend together, and that is what looks like a current.
The scale sets the size of the currents: the more motifs you ask for across the canvas, the tighter the curves get.
Over to you
Pick a field, trigonometry or noise, and its scale: the number of motifs across the width. The arrows show the direction at each point. “Release” drops 100 particles at random, “Ten steps” moves them ten steps at once, “Play” moves them on their own. Untick the arrows to keep only the trails. Changing the field or the scale clears the trails, which only belonged to the old field.
The drawing above is a teaching sketch, not the artwork: it shows the rule, it does not replay the colours, the size of the dots or the grain of the print.
What changes from one algorithm to the next
- Flow Field
- The field comes from trigonometric interference, and each particle leaves a continuous, sharp polyline.
- Perlin Flow
- The field comes from Perlin noise. A cloud of particles leaves very low-opacity trails, which build up into grain or mist rather than sharp filaments.
- Chroma Drift
- A cloud of points drifts through a looping noise field and changes colour with the local intensity of the field. It is drawn with points, never with continuous strokes.
- Vortex Swarm
- The field is that of several point vortices (the two-dimensional Biot-Savart law). Each particle leaves a trail, one polyline per particle.
- Drape
- No particles here: horizontal lines spread over the height, rippled by a sine wave and then by two-dimensional Perlin noise, for a fabric effect.
- Rheology
- Marbled bands of flow: layers rippled by multi-scale noise, then sheared, for a marbling effect.
- Eroded Strata
- A grid of geological strata, each cell shifted by an erosion field and a sinusoidal drift, for a layered-rock effect.
- Palimpsest
- Layers of stacked shapes, each eroded by noise, then a patina of cracks traced by a random walk guided by the noise.
- Low Mist
- A density field carried by a velocity field: Stam's semi-Lagrangian advection, the kind used for real-time fluids. The render is a full-frame pixel image.
- Silk Flame
- Trajectories leave the centre, follow a rippling noise field, then are copied by rotation (eight times by default). Drawn at very low opacity, they pile up into a silky veil.
What chance decides
For each artwork, the program draws these settings at random, between bounds set in advance.
- Number of particles Flow Field from 600 to 1,500
- Noise scale Perlin Flow from 0.015 to 0.08
- Number of vortices Vortex Swarm from 3 to 9
The algorithms in this family
- Flow Field
- Perlin Flow
- Chroma Drift
- Vortex Swarm
- Drape
- Rheology
- Eroded Strata
- Palimpsest
- Low Mist
- Silk Flame