Algebraic Colored Lattice Fields
A deterministic way to make a lattice interesting — without randomness, and without losing the exact arithmetic that makes lattices so pleasant to work with.
Why I Built This
I keep coming back to the same frustration: lattices are too clean. The very properties that make a lattice analytically tractable — periodicity, translational symmetry, uniform spacing — are exactly what make it a poor stand-in for anything that is supposed to look physical, textured, or generic. A pure lattice carries no information; every point is interchangeable with every other point under translation, and that uniformity is both a mathematical gift and, if you're trying to model something real, a quiet lie.
The obvious fix is to sprinkle in some noise. But randomness trades one kind of emptiness for another. White noise has no correlations, no spectral "color," no algebraic backbone; smoother random fields are nicer to look at but still require a probability measure, a choice of distribution, and they throw away the exact arithmetic that made the lattice worth starting from.
So the question that motivated this project was: can we build a perturbation that is deterministic, algebraically grounded, provably aperiodic, and spectrally tunable? Not random, not periodic — something genuinely in between. Colored noise, but for fields, and computed in exact integer arithmetic.
It turns out you can, and the mechanism is surprisingly simple.
The Idea in Plain Terms
Start with an ordinary grid — think of the integer points of the plane, $\mathbb{Z}^2$. Now nudge each point by a tiny amount, and then snap it back to the nearest grid point. That's the whole construction. The magic is entirely in how you compute the nudge.
There are two steps:
-
Algebraic deformation. For each grid point, we compute a small displacement whose coordinates live not in the ordinary rational numbers but in a quadratic number field — numbers of the form $a + b\sqrt{D}$ for a fixed square-free integer $D$ (the golden-ratio field, $\mathbb{Q}(\sqrt{5})$, is a natural example). This displacement field is what I call $\eta$.
-
Nearest-lattice snapping. After nudging, we project each point back to the nearest grid point. The result is a point set that stays infinitesimally close to the original grid, yet — provably — never repeats.
The reason it never repeats is worth dwelling on, because it's the heart of the thing. The irrational part of each displacement (the $b\sqrt{D}$ piece) is kept bounded away from zero by construction. If the pattern did have a repeating translation, the irrational parts would have to cancel out everywhere simultaneously — which would force that irrational component to collapse to zero. The lower bound forbids exactly that. In short: the irrational component acts as a rigidity condition, and rigidity is what kills periodicity.
What You Actually See
Here is the part I find genuinely delightful. If you plot the magnitude of the displacement field $|\eta(x)|$ across a large region, you don't get static, and you don't get stripes. You get something that looks strikingly like the large-scale moiré patterns you see when you zoom out on a Penrose tiling — those ghostly bands that almost repeat but never quite do.
This is not a coincidence. Penrose tilings get their character from projecting a higher-dimensional grid along directions defined by the golden ratio; the shimmering bands are the interference of incommensurate algebraic gratings. Our field is built from the same raw material — a $\sqrt{D}$ grating that is deliberately incommensurate with the integer lattice — so it produces the same family of long-range interference patterns. The difference is that here the pattern is:
- constrained to a plain square grid (not five-fold symmetric),
- infinitesimal in amplitude (the geometry stays hugging the original lattice),
- and, crucially, tunable — you can dial the "color" of the pattern by choosing which algebraic frequencies to include.
The mental image I keep is "Penrose moiré, constrained to a square grid, with adjustable spectral weight." Long-range quasi-stripes, algebraic interference, no true periodicity, and no randomness anywhere in sight.
Using the Tool
The interface is built around a single, direct feedback loop: change the algebraic ingredients, watch the field respond. The parameters you can play with map cleanly onto the theory:
- The field $D$ — choosing the square-free integer behind $\sqrt{D}$ sets the underlying incommensurate grating. Different fields give different flavors of interference.
- The frequencies — a set of irrational direction vectors that determine which spatial patterns appear in the field.
- The coefficients — the amplitude assigned to each frequency; this is your equalizer for shaping the "color" of the noise (blue, pink, hyperuniform, and everything between).
- The amplitude $\varepsilon$ — how far points are allowed to wander before snapping. Small values keep the geometry tight against the grid; larger values make the moiré more dramatic.
Because everything downstream of the $\sqrt{D}$ constant is integer arithmetic, the visualization updates cleanly and predictably — no floating-point drift, no per-pixel randomness, no seed to remember. The same parameters always give the same picture; the construction is fully reproducible by design.
A Little Context
It's worth locating this in the landscape, because it borrows from several well-studied neighborhoods without being identical to any of them.
- Quasicrystals (Penrose and Ammann–Beenker tilings, cut-and-project sets) share the "irrational coordinates with an algebraic backbone" flavor — but they are genuinely different point sets, not infinitesimal nudges of a lattice. We stay close to the grid and snap back; they project away from it.
- Perturbed lattices in the usual sense nudge each point by a small, often random displacement. Ours is a perturbed lattice too, but with a deterministic, algebraically structured nudge and a nonlinear snapping step that the standard theory doesn't include.
- Algebraic number fields in tiling theory are old friends. What's unusual here is that the number field generates the deformation, one level removed from the geometry — which is precisely what buys us the freedom to tune the spectrum.
So this is best thought of as a small hybrid: a bit of quasicrystal theory, a bit of perturbed-lattice theory, a bit of algebraic number theory, and a bit of quantization — assembled into a single primitive that is simpler, and far more computationally tractable, than any of its ancestors. It shares its central conviction — that the number field of a construction's coordinates, not its visual form, is the real invariant — with the Pentagon Lattice Geometry work, where exact golden-ratio arithmetic (the field $\mathbb{Q}(\sqrt5)$ that also serves as the natural example here) is what keeps a delicate multi-sheeted structure from tearing under rounding error. The two projects approach algebraic structure from opposite directions: Pentagon Geometry stacks frustrated tiles onto extra sheets, while this one nudges a flat grid and snaps it back — but both insist on exact arithmetic in a quadratic field as the thing that makes the construction well-defined.
Why It's Interesting
A few reasons this holds my attention:
- It fills a real gap. Between "sterile lattice" and "structureless random noise" there's a whole territory of structured determinism that is hard to reach by conventional means. This construction lands squarely in it.
- The spectrum is a design surface, not an accident. The field has a pure-point (Bragg-peak) spectrum whose intensities you choose. Designing the spectrum is an inverse problem in algebraic harmonic analysis — the kind of open question I find hard to walk away from.
- It's exact. No probability measure, no distribution, no ensemble. You can reason about it, reproduce it, and compute it in integer arithmetic all the way down.
- It's beautiful. I'll admit that's not a rigorous criterion, but the visuals genuinely reward exploration.
Who Might Find This Useful
- Researchers in aperiodic order and quasicrystals, as a new and unusually simple point of comparison — an infinitesimal aperiodic structure rather than a projected one.
- People working with procedural textures and generative art, who want structured, tunable, repeatable "noise" with a distinctive moiré character and zero randomness to manage.
- Anyone modeling structured disorder — coherence-cost fields, local energy densities, disorder fields — where you'd like the substrate to carry algebraic structure rather than statistical structure.
- The mathematically curious, who simply want to turn some knobs and watch incommensurate gratings interfere.
Where This Could Go
A few directions I'm keen to explore, and would love feedback on:
- Spectral classification — given a target spectrum (blue, pink, hyperuniform), which algebraic ingredients get you there?
- Multi-scale stacking — layering fields at different scales and directions for a hierarchical, multi-color result.
- Higher-degree fields — moving beyond $\sqrt{D}$ to algebraic numbers of degree three and up, and asking how field degree translates into visual complexity.
- Physical coupling — treating the field as a substrate that some dynamics live on, and asking how algebraic structure in the substrate propagates into observable behavior.
None of these are settled. If any of them resonates with your own work, I'd genuinely like to hear about it.
More soon, I hope — and in the meantime, enjoy turning the knobs.