What makes art “generative”?
In most drawing you decide where every line goes. In generative art you decide the rules, and the lines follow from them. The artist chooses what the system can do and adjusts it until the results are interesting; the system does the drawing. Artists such as Vera Molnár and Georg Nees were already making computer-generated drawings this way in the 1960s.
Most generative pieces combine three ingredients: a set of rules, some controlled randomness so each result is a little different, and a few settings the artist can tune.
The flow field.
Imagine a weather map covered in little arrows, one for every point, showing which way the wind blows there. That map is a flow field. Drop a particle anywhere, let it follow the arrow under it, and it traces a smooth path. Drop hundreds of particles and their paths start to reveal the shape of the whole field.
Wind Garden uses 96 seeds. They start on a 12 × 8 grid with a little random offset each, so they cover the whole garden evenly without looking like a grid. Every frame, each seed works out the field at its position and steers towards it, then moves a tiny step. Here is the heart of it, slightly simplified from the code that runs Wind Garden:
for (const seed of seeds) {
// 1. The field: the wind's direction plus a gentle swirl that depends on position and time.
const swirlX = Math.sin(seed.y / 105 + time * 0.3) * 30 * curl;
const swirlY = Math.cos(seed.x / 150 - time * 0.22) * 30 * curl;
const targetX = (Math.cos(angle) * 80 + swirlX) * strength;
const targetY = (-Math.sin(angle) * 80 + swirlY) * strength;
// 2. Steer: move 7% of the way towards the field each frame, so turns are smooth.
seed.vx += (targetX - seed.vx) * 0.07;
seed.vy += (targetY - seed.vy) * 0.07;
// 3. Move, and remember a short trail to draw.
seed.x += seed.vx / 60;
seed.y += seed.vy / 60;
seed.trail.push([seed.x, seed.y]);
}Three details are worth noticing. The field is a sum of a steady wind and a swirl that changes with position, which is why neighbouring seeds move similarly but distant ones don’t. The seeds steer towards the field instead of jumping to it, which gives them momentum and smooth curves. And the swirl also changes slowly with time, so the garden never quite repeats itself.
What each setting changes.
Direction
The angle of the steady wind. In Wind Garden you can drag across the garden to set it, or use the keyboard. Seeds that leave one edge come back on the opposite side, so the field fills the frame however the wind blows.
Strength
How fast the field moves the seeds. Low strength gives short, delicate trails; high strength stretches them into long streaks. At zero the garden stands still, which is the easiest way to freeze a moment you like.
Turbulence
How much the swirl matters compared with the steady wind. Each Wind Garden scene has its own amount:
| Scene | Swirl amount | What you see |
|---|---|---|
| Blue hour | 1.4 | Small silver seeds following a curling current. |
| Meadow | 0.7 | Long, light seeds in a green breeze. |
| Golden hour | 0.4 | Warm, broad seeds in a sideways drift. |
The random seed
Generative art usually uses a seeded random number generator: the same seed number always produces the same “random” choices. That’s why each Wind Garden scene starts exactly the same every time you open it, and why two people comparing settings see the same thing. A different seed would give a new garden that follows exactly the same rules.
Three experiments to try.
- One change at a time. Open Wind Garden on Meadow and turn only the direction. Our study Same garden, different wind compares two directions from an identical starting field.
- Calm versus current. Switch between Golden hour and Blue hour without touching anything else. The same rules with more swirl give a completely different mood.
- Catch a moment. Pause, step forward a second at a time, and download a still image when the trails line up in a way you like. Choosing the frame is part of the art.
Where to go next.
Flow fields are a starting point for many generative techniques: drawing much longer trails, letting particles leave marks only in certain places, or building the field from noise functions instead of sine waves. If you want to experiment with code, the snippet above is enough to start in any language that can draw lines. If you’d rather keep playing, Symmetry Studio is another rule-based tool: you draw one mark and its mirrors generate the rest.