HomeArticlesTruchet Tiles

Truchet Tiles: How One Square Rotated at Random Builds a Maze

A single tile with two arcs, rotated randomly across a grid, self-assembles into sprawling maze-like patterns with no planning at all.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

A tile with two arcs

A Truchet tile is a single square divided by two quarter-circle arcs (or, in the original 1704 version, a diagonal line) connecting the midpoints of adjacent edges. Sébastien Truchet, a French Dominican friar and mathematician, studied what happens when such a tile is placed on a grid in one of its four rotations chosen at random. Individually, each tile is trivial. Tiled edge to edge across a grid, the arcs of neighbouring tiles line up perfectly — the flat edges of the square guarantee that — and the pattern self-assembles into continuous winding paths with no planning at all.

live demo · randomly rotated arc tiles knitting into paths● LIVE

The key structural fact is that a Truchet tile has rotational symmetry of order 2 for the arc variant (rotating it 180° gives the same picture) but only one of its four 90° rotations at a time is drawn, so a grid of independently randomised tiles has 4ⁿ possible layouts for n tiles — astronomically many, yet every single one tiles seamlessly because the connection points never depend on the rotation.

Why the paths never dead-end

Each edge of a tile is touched by exactly one arc endpoint, and every internal edge of the grid is shared by two tiles. Whatever arc leaves one tile through a given edge is met by an arc entering the next tile through that same edge, because the tile design fixes an endpoint at every edge midpoint, not just some of them. The consequence is that arcs can only terminate at the boundary of the whole grid; everywhere inside, they continue smoothly from tile to tile, producing loops and winding corridors instead of the sharp dead-ends you would get from randomly placed disconnected shapes.

tile rotation 0:    tile rotation 90:
   .--.                .  .
  (    )              ( )( )
   .  .                .--.

each edge midpoint carries exactly one arc endpoint
→ neighbouring tiles always connect, never clash

From decoration to computation

Truchet's own 1704 paper was about ornamental floor tiles, and for two and a half centuries that is mostly what the pattern stayed — a decorative motif in parquet, ceramics and textile design. Its second life began in 1987, when Cyril Stanley Smith republished Truchet's plates with commentary connecting them to statistical mechanics: a random Truchet tiling behaves like a two-dimensional analogue of a percolation lattice, and the arcs trace out the boundary curves between two interleaved sets of regions, similar in spirit to domain walls in an Ising model.

The connectivity structure is also exactly what you get from random maze generation. If you interpret each tile's arcs as walls that block or permit movement between quadrants, a Truchet grid is a valid — if unusually curvy — maze: every cell is reachable from every other by following a continuous corridor, and because the arcs never cross, the maze has no ambiguous overlaps.

Variants: the wider Truchet family

Modern generative art extends the base tile in several directions that all keep the edge-midpoint connection rule intact. Diagonal Truchet tiles (a straight line corner-to-corner instead of two arcs) give a blockier, more angular texture. Adding a third state — a tile left blank — introduces controllable sparsity. Weighting the four rotations non-uniformly biases the pattern toward diagonal drift in one direction, producing a visible flow instead of an isotropic maze. Multi-scale variants recursively subdivide tiles, and colour-filling the regions bounded by the arcs (rather than just stroking the arcs) turns the same construction into the swirling two-tone patterns common in generative art.

for each cell (x, y):
    rotation = random(0, 90, 180, 270)
    draw two quarter-circle arcs, corner pair chosen by rotation
    # optional: draw(rotation + 180) too is the same tile — order 2 symmetry

Implementing it on a canvas

The renderer is a single pass over a grid: pick a cell size, loop over rows and columns, and for each cell choose one of two arc-pair orientations at random (the four rotations reduce to two distinct visual states because opposite corners produce the same picture). Draw each as two quarter-circle arcs with the HTML5 canvas arc() primitive, offset by the cell's top-left corner. No global coordination is needed — the seamless connections are a geometric guarantee of the tile design, not something the algorithm has to enforce. That is what makes Truchet tilings a favourite first project in generative art: a few dozen lines produce structure that looks hand-planned.

Frequently asked questions

Do Truchet tiles need to be placed in a specific pattern to connect?

No. Any of the four rotations can go in any cell. Because every tile has exactly one arc endpoint at each of its four edge midpoints, whichever rotation you pick, its arcs always meet the arcs of its neighbours — the seamless connection is guaranteed by the tile's geometry, not by planning.

What is the difference between arc and diagonal Truchet tiles?

The original 1704 design used a single diagonal line splitting the square into two triangles of different shading. The now more common version replaces the line with two quarter-circle arcs, which produces continuous curved paths instead of jagged triangular boundaries — the connection rule at the edges is identical either way.

Are Truchet tilings related to maze generation?

Yes. If you treat each tile's arcs as walls, a random Truchet grid is a valid maze: because arcs never cross and every internal edge connects seamlessly to its neighbour, every cell stays reachable from every other cell through a continuous winding corridor.

Try it live

Everything above runs in your browser — open Truchet Tiles and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Truchet Tiles simulation

What did you find?

Add reproduction steps (optional)