Moire Interference 3D

Two transparent sheets with a real gap over a Blender-built light box: rotate, slide and move your head to make the fringes sweep and shift.

Presets

Playback

Gratings

Pitch and angle

Shape, motion and gap

Camera

Layers

Quality

Model check

The science

Why two gratings make fringes

A grating of pitch p is a periodic transmission T(x) = ∑ an cos(n k x) with k = 2π/p. Light passing through two stacked gratings is multiplied, T = T1 T2, and a product of cosines contains the difference frequency: cos(k1·r) cos(k2·r) = ½[cos((k2 − k1)·r) + cos((k2 + k1)·r)]. The eye, or any blur wider than the pitch, removes the fast sum term and keeps the slow one: the moire fringes. They are the beat pattern of the two gratings in space, exactly like the beat of two close sound frequencies in time.

Exact fringe period and direction

The fringe wave-vector is kb = k2 − k1, so the period is d = 2π/|kb| = p1p2 / √(p12 + p22 − 2p1p2 cosθ) and the fringe lines run perpendicular to kb. For parallel gratings (θ = 0) this is p1p2/|p1 − p2|; for equal pitches rotated by θ it is p / (2 sin(θ/2)), nearly perpendicular to the lines for small angles.

Magnification of motion

Sliding one grating by δ changes the phase of the beat term by 2πδ/p, so the fringes move by dδ/p: a tiny displacement becomes a large visible one with gain d/p. This is the principle of moire strain gauges, vernier scales and optical encoders. Rotating one grating also sweeps the fringes quickly through large angles.

Other gratings

Binary gratings contain harmonics (n k), so extra weaker moiré families appear at n k2 − m k1; dot lattices have two such vector pairs; two concentric ring sets with different pitches give circular fringes of radial period p1p2/|p1 − p2|; spokes beat in angle. The formulas above are for line and sine gratings; the other types are shown but only the first-order line formula is printed.

Honest simplifications

The gratings are ideal transmissions multiplied pixel by pixel on a 360 px grid (no diffraction, no gap, no colour). Display size and sampling matter: if a pitch drops toward 3 px, aliasing produces false fringes that are artefacts of the screen, not of the model. The 3D twin adds a real gap between the sheets, which gives a parallax shift.

The gap and parallax (3D only)

In the 3D bench the two sheets are really separated by a gap h, drawn as semi-transparent ink over an emissive light box, so the product of transmissions comes out of ordinary alpha blending. Looking at an angle φ from the vertical, sheet 2 appears displaced against sheet 1 by h tanφ, and the fringes move by (d/p) h tanφ: moving your head makes the fringes slide. Looking straight down removes the effect. Pattern aliasing is limited by the screen resolution, so very fine pitches fade to grey.

Model checks in this page

(1) parallel sine gratings on a 256 px window, with pitches chosen so the beat lands on an exact FFT bin: the measured period equals p1p2/|p1 − p2|; (2) rotated gratings: measured period and direction equal the vector formula; (3) shifting one grating by a quarter pitch moves the fringes by dδ/p as read from the FFT phase.

Loading model...
Loading Blender model...
Averaged transmission along the fringe normal
Fringe period against rotation angle (closed form vs FFT)
Spatial-frequency spectrum of the product (k1, k2, kb)
Fringe magnification d/p1 against pitch ratio
Made with 🟠 Blender · Three.js