Substrate
Jared Tarbell · 2003
A landmark early-2000s generative work by Jared Tarbell, written in Processing and published open-source: crack-like lines propagate and branch at right angles into dense, city-map-like partitions of the plane.
How it works
A population of moving "cracks": each line advances until it hits another line and stops, and every stopped line spawns a new one growing perpendicular from an existing crack — so the plane fills with a dense right-angled web.
Substrate is an agent system whose agents are line segments — "cracks". The state is a grid recording which cell each crack has already passed through (and at what angle). Each step does three things. (1) ADVANCE: every crack moves one small step along its current heading, drawing as it goes. (2) COLLISION: if a crack steps onto a cell already occupied by another crack (or off the edge), it stops for good. (3) SPAWN: whenever a crack stops, a new crack is seeded — it starts from a random point on an existing line and heads PERPENDICULAR to that line (±90°, with a little random jitter). That single perpendicular-branching rule is the whole aesthetic: because new cracks meet old ones at right angles and then halt on contact, the plane partitions into the interlocking rectangles and city-block wedges Substrate is known for, growing denser as it fills. Tarbell coloured the regions with a stochastic "sand painter", but the structure is entirely this grow-collide-branch loop. He wrote it in Processing and released the source, which is why it became a widely-copied reference algorithm (the index carries it as the `substrate` algorithm, named after this work). The live demo runs the same loop; its spacing and jitter are a reconstruction, not Tarbell's exact constants.
Algorithms
- Substrate primary · classification: human-reviewed
Details
Sources
Last updated 2026-07-16