How it works
How one rotated tile becomes a portrait
The portrait above is made of curves. Up close, it’s just one tile, repeated over and over. The face is hiding in a single number per tile.
One square, two quarter circles
A Truchet tile is a square with two quarter circles drawn in opposite corners. Each arc starts at the middle of one edge and ends at the middle of the next, with a radius of half the tile.
The tile can sit in two orientations: arcs in the top-left and bottom-right corners, or in the top-right and bottom-left. Pick one at random for every tile in a grid, a coin flip each, and something nice happens: the curves always connect at the edges. Every arc ends exactly at an edge midpoint, and the neighboring tile always has an arc starting there too. The grid fills with long, winding, unbroken paths.
This family of patterns is named after Sébastien Truchet, who studied tile patterns in the early 1700s. The quarter-circle version is a popular modern variant.
Same width, no portrait
Draw every line with the same width, and there’s no portrait. Just a random pattern of loops. Each tile has the same amount of ink, so from a distance the whole thing looks like an even gray.
Let the photo choose the width
Now give each tile its own line width, chosen by the picture underneath:
- Split the photo into a grid of cells, one per tile.
- Measure how bright each cell is on average.
- Dark patch, thick curves. Light patch, thin curves.
More ink means a darker tile. In the reel’s version, each tile aimed for an ink coverage between 4% (for the brightest cells) and 92% (for the darkest), and the stroke width was tuned until the drawn tile actually covered that much. Width changes never move an arc’s endpoints, so the curves still meet at the edges.
Change only the widths, and the face appears. The reel used Vermeer’s Girl with a Pearl Earring on a 72 × 85 grid. No pixels of the painting are blended in; every mark is a curve.
Roll again
The rotations are still random. So roll them again: a new random seed, so every tile flips its own coin again.
You get different curves, but the same face. The paths now wind in completely different directions, yet the portrait looks the same from a distance.
That is the whole lesson of this algorithm: the picture lives in the amount of ink, not the direction of each tile. Your eye averages each small patch, and the average darkness is all that was set by the photo.
One technical note from the reel’s version: the guarantee that paths connect is about the thin center lines of the arcs. When the strokes get very wide in dark areas, neighboring ink bands can touch or overlap, and adjacent tiles can have different widths. The center lines still form unbroken paths underneath.
What the controls change
Tiles across sets how many tiles fit across the width of your photo, from 8 to 200; the number of rows follows from the photo’s shape. The label on the canvas shows the full grid, for example 64 × 80 tiles. Very tall photos are capped at 256 rows, so the actual count across may come out a little lower.
- Fewer, bigger tiles make a bold graphic pattern where you can follow each curve with your eye. The face becomes a rough silhouette.
- More, smaller tiles bring out detail like eyes, the nose and the edge of the jaw, and the curves blend into shading.
Line width scales every stroke, from a quarter of the calibrated width up to two and a half times it. Thin lines keep the curves visible and airy; thick lines merge into solid shadow. The calibrated width at 1 is the one that matches each tile’s ink to the photo’s darkness.
Invert swaps paper and ink, giving light curves on a dark background.
The rotations come from a fixed random seed, so the same photo and the same setting always give the same picture. Changing the tile count deals out a fresh set of coin flips across the new grid, and the face survives it every time. That is the reel’s reroll in another form: the curves change, the portrait doesn’t.
Export as SVG
Because the result is made of pure geometry, you can download it as an SVG file. It stays sharp at any size, so it works for posters and for pen plotters or laser cutters, which can follow each path.
Try this
- Use a close-up portrait with clear lighting, a face that fills most of the frame. Strong shadows give the widest range of line widths.
- Look at it from far away. Hold your phone at arm’s length or squint: the curves disappear and the face sharpens.
- Try two nearby tile counts, like 40 and 44, and compare. Nearly every curve is different, yet the face looks the same.
Your photo is processed on your own device. Nothing is uploaded.
Watch the reel
- “This portrait is made of curves”
Your photo is processed by this page, on your device. It is never uploaded, stored or seen by anyone else. Privacy