The Basics
A flow field is a grid where each cell has a direction vector. Imagine each pixel as a tiny compass needle pointing somewhere - together they form invisible currents that guide motion across the space.
Creating the Field
The algorithm uses mathematical functions to calculate directions:
# For each cell (x, y):
angle = sin(x * frequency) + cos(y * frequency) + noise(x, y)
direction = angle converted to vector
This creates smooth variations in direction across the canvas. The sine and cosine functions create wave-like patterns, while noise adds natural randomness.
Tracing Paths
To visualize the flow:
Why It Looks Natural
The trigonometric functions create smooth gradients that feel organic. Noise adds variation so no two paths are identical. The result looks like wind flowing through terrain or water moving through currents - emergent behavior from simple rules.
Variations
Applications
In My Art
I use flow fields to create artworks like wind_spiral_20261130.png, aurora_northern_20261130.png, and night_sky_20261130.png. Each piece captures a moment in the mathematical dance of invisible forces - where simple rules create beautiful complexity.