beatfield

the moiré as the difference frequency of two gratings
moiré period
175.5 px
12.5 times the finer pitch
visible term
kA−kBk_{A} - k_{B}
fringes run at
123.0 deg
B at 4.00 deg
magnification
x 12.02
B moves 1 px, fringes 12.0 px
fringe contrast
23.5%
unblurred
lines
resolved
they vanish at about 8.4 px of blur
fringe profile, two periods
reciprocal space
G-H

filled: spots of A. rings: spots of B. White: G + H, the moiré.

near zero, x3.1

Dots: every product of spots near zero. Dashed: coarse enough to be a moiré.

The product

Two stacked transparencies pass the product of their transmittances. For two sinusoidal gratings the product is a sum and a difference:

cos⁡(2πkA ⁣⋅ ⁣x) cos⁡(2πkB ⁣⋅ ⁣x)=12cos⁡ ⁣(2π(kA−kB) ⁣⋅ ⁣x)+12cos⁡ ⁣(2π(kA+kB) ⁣⋅ ⁣x)\cos(2\pi \mathbf{k}_A\!\cdot\!\mathbf{x})\,\cos(2\pi \mathbf{k}_B\!\cdot\!\mathbf{x}) = \tfrac12\cos\!\big(2\pi(\mathbf{k}_A-\mathbf{k}_B)\!\cdot\!\mathbf{x}\big) + \tfrac12\cos\!\big(2\pi(\mathbf{k}_A+\mathbf{k}_B)\!\cdot\!\mathbf{x}\big)

The sum is finer than either grating and the difference coarser. Anything that cannot resolve the gratings, an eye at a distance or a lens slightly out of focus, removes both of them and the sum, and what is left is the difference. The moiré is not in either layer. It is the low-frequency part of their product.

Period and direction

For line gratings of pitches aa and bb at angle θ\theta, the difference vector has length

∣kA−kB∣=a2+b2−2abcos⁡θab,Λ=aba2+b2−2abcos⁡θ|\mathbf{k}_A - \mathbf{k}_B| = \frac{\sqrt{a^2 + b^2 - 2ab\cos\theta}}{ab}, \qquad \Lambda = \frac{ab}{\sqrt{a^2 + b^2 - 2ab\cos\theta}}

At θ=0\theta = 0 this is the beat, ab/∣a−b∣ab/|a-b|; at a=ba = b it is a/(2sin⁡(θ/2))a/(2\sin(\theta/2)). The fringes run perpendicular to the difference vector, which for two identical gratings means almost perpendicular to the lines themselves, bisecting the obtuse angle between them.

Magnification

Translating layer BB by δ\delta shifts its phase by δ/b\delta/b of a period, and the moiré, being a difference of phases, shifts by the same fraction of its own period. The fringes move Λ/b\Lambda/b times as far as the layer. For pitches of 10 and 11 that is ten: the principle of the vernier, and of moiré strain measurement, where a deformation too small to see moves fringes large enough to count.

Beyond the first order

Sharp lines have harmonics, and every product of a harmonic of one layer with a harmonic of the other lands somewhere. When the pitches are near a ratio of two, kA−2kB\mathbf{k}_A - 2\mathbf{k}_B lands near zero and is the moiré you see; the first-order formula predicts something finer than the lines. Sweep the pitch ratio and the visible period diverges at every simple fraction.

A line of duty dd has harmonics proportional to sin⁡(πnd)/(πn)\sin(\pi n d)/(\pi n), which vanish whenever ndnd is an integer. At a duty of one half every even harmonic is zero, and every moiré that needs one disappears.

Addition makes none

Two projectors add light instead of multiplying it. A sum of two Fourier series has no cross terms, so no difference frequency. The bands visible at full sharpness are a beat in local contrast, and blurring past the pitch leaves a uniform field. Measured, the coarse structure that survives is one ten-thousandth of what survives when the same layers are stacked.

Lattices, and graphene

Two identical triangular lattices twisted by θ\theta form a triangular superlattice of constant a/(2sin⁡(θ/2))a/(2\sin(\theta/2)). With carbon's a=0.246a = 0.246 nm and θ=1.1∘\theta = 1.1^\circ that is 12.8 nm, the superlattice of magic-angle graphene, whose flat electronic bands produce correlated insulating and superconducting states. The playground reproduces the geometry and nothing more; the magic angle itself depends on the coupling between the layers.

The screen is a grating

A display samples on a lattice of pixels, and a pattern with frequencies above half the pixel frequency folds back below it. A single grating of pitch 3.1 px drawn without antialiasing shows a 31 px pattern: its third harmonic beating against the pixels. Drawing each pixel with the ink it actually covers makes the pixel a box filter, whose zeros fall at multiples of the pixel frequency, exactly where the frequencies that would fold to near zero sit. The pattern falls by a factor of about thirty. The same folding is why a camera pointed at a screen records moiré the eye does not see.

Limits

Geometric optics only: gratings near the wavelength of light diffract, and none of that is here. The viewer is a Gaussian blur, where the eye is a band-pass filter whose peak moves with viewing distance. Ring moirés are predicted locally and fail within about a pitch of a centre. Each of these is listed, with what would falsify it, in the assumptions panel.

Every predicted period in the calibration is checked against a Fourier transform of rendered pixels, which shares nothing with the prediction but the definition of a layer.

Model

v1.0September 2026
  • the moiré is predicted by enumerating every product of a spot from each layer and choosing the one that survives a blur wide enough to hide the gratings, rather than by a formula. The first-order formula is shown alongside, and the two disagree exactly where a higher-order term is the visible one.
  • layers multiply. That is the physical model of stacked transparencies and the only one that produces a difference frequency; the additive mode, two projectors, is kept to show that without the product there is no moiré once the lines blur out.
  • every pixel reports the exact fraction of its area each layer's ink covers: a trapezoidal footprint against straight marks, and the closed-form area of a disc inside a square for dots. An approximation here would be periodic in where a mark falls relative to the pixel grid, which is a moiré against the screen made by the renderer.
  • the blur is applied in linear light and only then encoded for the display. Blurring encoded values would put a nonlinearity between the two layers and the viewer, and a nonlinearity is what makes a moiré out of two added patterns.
  • the fringe profile is summed over the harmonics of the visible term rather than taken from its fundamental. For thin lines the fringes are a peak, the cross-correlation of the two mark profiles, and the fundamental alone understates their contrast by a factor of two to three.
  • a moiré is only reported if it survives the hiding blur by at least half, and the measurement uses the same rule. An earlier version applied it to the prediction and not to the measurement, and the two then disagreed on one lattice in a hundred and fifty by picking different terms near the threshold.
  • the width of the marks is a duty, a fraction of the pitch, shared by both layers. The spectral zeros that make some moirés vanish are statements about the duty; a width in pixels would have made the second-order preset's claim false, since widening B's lines to half its pitch would have blackened A.