create({ tileable: true })Every mode in this field is a plane wave e^(i k·x). If every k is an
integer vector then every mode has period 2π in x, y and z — so their sum does too, exactly,
as arithmetic. tileable: true is that one line: each drawn wavevector is rounded to the
nearest lattice point and the transverse frame is re-derived from the rounded vector, so
k·e = 0 still holds and the field is still exactly divergence-free. Nothing is blended,
mirrored or cross-faded at the edge of the cell, because there is no edge.
The wall below is one 208×208 image of the cell [0,L)², blitted 1:1 into a grid.
The renderer never re-samples the field per tile, so the picture cannot fake periodicity; the only
open question is whether the field agrees with itself across the join. Hunt for the join with
tile joins off, then turn tileable off and watch the grid appear.
Rounding moves each wavevector by up to half a lattice unit, so the tileable field is not the same
field as its untileable twin — the spectrum is quantised, and at kmax = 5 that
quantisation is coarse. That is the price, and it is the whole price. Both fields here share the
seed and every other option.
The receipt. Every frame both fields are sampled on all three faces
of the cell — 3 × 24² = 1,728 point pairs — comparing u(0,y,z) with
u(L,y,z) and the same for the vorticity, reported relative to the largest |u| and |ω|
found on those faces. The tileable field reads 2e-15 absolute against |u|max ≈ 2, which is
double precision arriving at 2π; its twin reads 1.4–1.7 relative — a ratio above 1 because
the difference of two unrelated O(1) vectors can exceed either of them, which is the point: the two
edges are simply different flow. Fifteen orders of magnitude separate the two rows, and both are
printed at once, so the contrast does not depend on you toggling anything. The
strip above is the same check as a picture on one line: solid teal is the left edge, dashed amber is
the right edge, and when the cell is a period the dashes sit on top of the solid curve. Two curves
are always drawn, so a passing frame does not look like a frame that never ran.
Two ways to break it. tileable off is the obvious one. detune cell is the
sharper one: it leaves the field alone and asks it to tile at L = 2π(1+δ), a period it
does not have. One notch — δ = 0.0025, a cell a quarter of a percent too wide — already moves the
mismatch from 8e-16 to 1.6e-2, and it climbs smoothly from there (6.6e-2 at δ = 0.01, 0.58 at
δ = 0.1). So the number is reading the actual join, not the value of a flag.