Thousands of particles follow a Perlin noise vector field producing mesmerising turbulent flow patterns. Tune noise scale, speed, trail fade and colour palette — inspired by Van Gogh's Starry Night. Interactive generative art simulation running in the browser.
This is a real-time flow field, where 3,000 particles drift through an invisible vector field whose direction at every point is set by Perlin noise. The simulation samples a smooth 3D noise function on a grid of 20-pixel cells, turns each sample into an angle, and steers every particle along the local angle each frame. Because the third noise axis advances slowly with time, the whole field gently swirls and reorganises, producing the turbulent, brush-stroke rivers of colour associated with generative art.
A two-dimensional noise flow field. Improved Perlin noise (Ken Perlin, 2002) is evaluated as noise(c·scale, r·scale, t) on each grid cell and mapped to a heading angle; particles step in that direction at a fixed speed, leaving fading trails. The slowly increasing time coordinate makes the field animate continuously rather than stay static.
Palette switches the colour scheme and background (Ocean, Van Gogh, Fire, Mono). Noise Scale (Sparse, Normal, Dense) sets how tightly the field varies. Speed (Slow, Normal, Fast) controls particle step length. Trails (Long, Medium, Short) sets how quickly old strokes fade. "New Field" reseeds and respawns all particles; "Pause" freezes the animation.
Ken Perlin invented Perlin noise in 1983 for the film Tron and won a 1997 Academy Award for it. The "improved" 2002 version used here swaps the original gradient lookup for a fixed set of gradient directions and a smoother fade curve, removing visible grid artefacts.
A flow field assigns a direction (and sometimes a speed) to every point in space. Here each grid cell stores an angle, and particles simply follow whichever angle they currently sit over. Tracing many particles through the field reveals its structure as flowing, river-like streaks.
For each 20-pixel cell it computes a Perlin noise value at that location and the current time, then scales it into an angle. A particle reads the angle of the cell beneath it and advances by cos(angle) and sin(angle) times the speed, so neighbouring particles follow nearly identical, smoothly varying paths.
Noise Scale changes the sampling frequency of the noise (roughly 0.0014, 0.0028 or 0.0056 per pixel): sparse settings give broad, sweeping currents while dense settings give tight, intricate eddies. Speed changes how far each particle moves per frame, between about 1.3 and 4.5 pixels.
Not exactly. It is a visually convincing approximation, not a solution of the Navier-Stokes equations. Real fluids conserve mass and momentum, whereas this field is purely a noise function and is not divergence-free, so it captures the look of turbulence without simulating its underlying physics.
The noise is sampled in three dimensions, with the third coordinate tied to a time counter that increases each frame. Moving slowly through that third axis is like cross-sectioning a smoothly varying 3D texture, so the field morphs continuously. Pressing Pause stops the time counter and freezes the current field.