Truchet tiles at every size from fourteen cells down to one, packed largest first into a forty-eight-cell grid.
Truchet at several scales
A Truchet tile carries a motif that meets its own edges at fixed points, so that
neighbouring tiles join whatever their orientation. This piece takes that further:
the tiles are not all the same size.
Tiles run from MaxSize cells square down to one, and because every size meets its
edges at the same proportional points, a ten-cell tile joins a one-cell tile as
cleanly as it joins another ten-cell tile.
The largest tiles. The placement is dart-throwing: pick a random cell, test whether a
tile of the current size fits there, and place it if so.
Down the size ladder
int size = Math.Min(MaxSize, Dimension);
bool done = false;
while (!done)
{
int tries = RndAttempts;
…
if (!placed)
{
if (size == 1) { /* fill every remaining cell */ done = true; }
else size--;
}
}
RndAttempts failed throws in a row is taken as evidence that no more tiles of this
size will fit, and the size drops by one. That is a probabilistic stopping rule, not a
proof — occasionally a gap that would have fitted is missed, and the piece is better for
it, because a perfect pack at each size would leave a suspiciously regular remainder.
At size one the rule changes: rather than throwing darts, every remaining empty cell is
filled exhaustively. The tiling is therefore always complete.
A little over a tenth of the tiles.
Nearly a third. The joins across tiles of different sizes are visible now, and they are
seamless — an arc leaving a large tile at its edge midpoint is met by an arc entering a
small one at the same point.
Three fifths. Note how far down the size ladder that gets: most of the count is in the small
tiles, because each size step leaves gaps that the next size fills several times over.
Complete.
Curved or straight
public float PCurved { get; init; } = 1f;
Each tile takes a quarter-arc motif with probability PCurved and a straight-line motif
otherwise. At 1 every tile is curved and the whole piece reads as woven cord; drop it
and straight segments break the curves into a mixture of rope and lattice.
Five renderings
| Rendering | Grid | Max tile | Structure | Palette |
|---|
| Cobalt Monoliths | 48 | 14 | broad nested arcs | ice blue on deep navy |
| Vermillion Switchyard | 56 | 9 | arcs, rails and inset tile frames | vermillion on warm paper |
| Violet Tides | 42 | 11 | pinched fixed Bézier curves | lilac on aubergine |
| Copper Cells | 72 | 6 | dense mixed motifs and cells | copper on forest-black |
| Acid Ribbons | 34 | 13 | variable sweeping Bézier curves | acid yellow on charcoal |
Dimension and MaxSize together decide the range of scales in the piece: a large grid
with a small maximum gives a near-uniform texture, and the reverse gives a few dominant
tiles surrounded by filler.
Determinism
The generator is seeded from the preset and consumed by the dart-throwing and by each
tile’s motif choice, in placement order. The exhaustive fill at size one consumes it in
grid order. Same seed, same tiling.