Technique · Geometry

Mazes

Perfect mazes grown by seven algorithms, drawn as line art, rounded into curving labyrinths, among Mondrian blocks, on an isometric cube, as solid walls in perspective, or down a Mondrian corridor.

Mazes is drawn geometry, rebuilt as it changes. Every piece on Synapse Drip is made from a recipe that layers techniques like this one, and you can change any of it in the Studio.

Good to know

  • The oldest labyrinth in story is the one Daedalus built at Knossos for King Minos, to hold the Minotaur; Theseus found his way out by the thread Ariadne gave him.
  • A labyrinth and a maze are not quite the same thing: a labyrinth, like the one laid in the floor of Chartres Cathedral about 1200, has a single winding path with no choices, while a maze has branches and dead ends and has to be solved.
  • The maze at Hampton Court Palace was planted around 1700 and is still the oldest surviving hedge maze in Britain.
  • In a perfect maze, one with no loops and no sealed-off cells, keeping one hand on the wall will always lead out, provided the entrance and the exit are both on the outer wall; that is why a sound maze for a game needs a loop or an island in it.
  • Maze algorithms were mostly found by computer scientists working on something else: Prim's and Kruskal's grow the cheapest network that joins a set of points, and Wilson's algorithm of 1996 came from the study of random spanning trees.

The mathematics

  • Joining n cells so that there is exactly one route between any two takes exactly n - 1 passages: here about 338, and every other wall between neighbouring cells stays. That is a spanning tree of the grid, and the algorithm that grows it decides the maze's character.
  • The number of different perfect mazes on a grid grows like 3.2 to the power of the number of cells (the constant is e raised to 4G/pi, with G Catalan's constant): about 10^171 for a grid this size.
  • Algorithms can be told apart by the dead ends they leave: the recursive backtracker leaves roughly one cell in ten, most of the others a quarter to a third, and the binary tree and the sidewinder leave an unbroken straight corridor along one or two edges, a bias you can see at a glance.
  • Wilson's algorithm is unbiased: because it erases the loops from each random walk, every possible spanning tree of the grid is equally likely, which no simple greedy method achieves.

In art

  • Mazes turn up in almost every culture: turf mazes cut into village greens, labyrinths laid in the floors of cathedrals, tomb carvings, puzzle pages, hedge gardens; a maze is one of the few designs in which the pattern and the obstacle are the same lines.
  • A maze is a drawing that can be read in two ways: as a pattern, from a distance, in which the walls make texture and rhythm, and as a puzzle, up close, in which every junction is a choice; pen-and-ink labyrinths, plotter art and generative posters all play on that doubleness.

More ways to use it

Related techniques

L-system · Space colonisation · Diffusion-limited aggregation · Flow ribbons · Ridgelines · Curve families · Streamlines · Paint strokes

All 90 techniques