Field card

File: truchet-grains.html Pattern: a notation (filled cells) crossed with a canvas (the infinite floor) — and the border, removed, stops hiding the phenomenon: almost every thread closes, so the whole plane fills into a mosaic of grains. Companions: truchet-cells.html (the same fill on a finite plate) and truchet-floor.html (the infinite, pannable, zoomable engine).

The brief that produced it

"What the loops enclose" probably works better on the infinite canvas — though the finite look is already good. Take the filled-loop notation (black strands, closed loops filled by area) and put it on the endless, pannable, zoomable floor. Keep it as a new study.

Source of truth

  • The floor is the hash-generated infinite field of truchet-floor.html (each tile a deterministic coin-flip of its coordinates), so it is stable as you roam and zoom.

  • The cells are computed each frame. For every viewport, the loops touching the visible tiles are enumerated by walking the arc network midpoint-to-midpoint (de-duplicated by component); each closed loop is filled, coloured by its area. Loops that don't close within a render budget (LOOPCAP) stay bare — honest, and rare.

  • Area is on an absolute scale, colour = log(area)/log(42) onto blue→yellow→red, so a cell keeps its colour while you pan and zoom (no per-frame renormalisation that would make grains shimmer). The hovered cell's area is arc-corrected (the circular-segment fix from truchet-cells.html), reported in tiles.

Honesty check (why the picture is true, not flattering)

The whole claim of the pairing is "remove the border and the field fills" — and that is exactly why it's honest: on a finite plate the border chops most threads into open (bare) ones, so truchet-cells.html shows ~11 cells in a sea of bare black. The border was an artifact suppressing the real phenomenon. With no border every thread closes (loops on the random field are almost surely finite), so the floor genuinely fills — verified by roaming: tiny cells everywhere and, when you find one, a giant. A hovered grain measured 0.79 tiles (a unit ring, π/4 — the arc correction working) up to 593 tiles (one enormous grain), which is the heavy-tailed grain-size distribution of the critical loop model, now something you stumble on by exploring rather than read in a table. "Too large to resolve" is stated honestly for the rare over-budget loop; it is never filled as if closed.

Design choices worth keeping

  • The border removed is the design move — same lesson as truchet-floor.html, but here it changes what is shown: from a few cells to a continuous microstructure.

  • Absolute colour, so grains don't shimmer. A cell's warmth is intrinsic; pan past it and back and it is the same colour. This matters more than per-frame min/max prettiness.

  • Nesting handled on the canvas. Cells are filled largest-area first so a grain inside a grain paints on top; hover picks the smallest cell containing the pointer.

  • Per-frame budget, stated. Enumeration is skipped above a visible-cell cap (extreme zoom-out) and over-budget loops stay bare, so the widget never lies by filling an unclosed path.

  • Drag / scroll / pinch / +− roam and zoom, anchored under the pointer; hover reads area; sr-only summary carries the whole idea without colour.

  • Thread-back: "why does random tiling look like a metal's grain structure?" — the Cyril Stanley Smith reading, where the cells are grains and the strands are grain boundaries.

What it teaches the studio

Notation and canvas are separable, and the best widget is sometimes their product. The fill notation came from one study, the infinite/zoom canvas from another; crossing them did more than add features — it revealed that the finite frame had been hiding the phenomenon the fill was meant to show. Five Truchet plates now span the space (hue-as-identity, fate-of-a-trace, length-as- colour, area-as-fill, and area-as-fill without end) — the clearest case the gallery makes for the README's claim that the style is a way of seeing, not a picture.