PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Optics & Light

Other simulators in this category — or see all 44.

View category →
NewSchool

Fiber: Numerical Aperture

NA from n_core, n_clad; acceptance angle and bend loss cue.

Launch Simulator
NewSchool

Fiber Bend & TIR Loss

Curved core: outer-wall incidence vs θ_c; tight R leaks (meridional sketch).

Launch Simulator
NewUniversity / research

Evanescent Wave (TIR)

Beyond θ_c: penetration depth scale in the rarer medium vs λ.

Launch Simulator
NewSchool

Retina & Diffraction

Order-of-magnitude θ ~ λ/D and cone spacing scale.

Launch Simulator
NewSchool

Pinhole Camera

Camera obscura: similar triangles, image size h_i = h_o · v/u.

Launch Simulator
NewSchool

Rainbow in a Droplet

Snell in a sphere: primary (1× internal reflection ~42°) and secondary (2× ~51°, reversed spectrum); scan b/R and n.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Optics & Light/Moiré (Line Gratings)

Moiré (Line Gratings)

Moiré patterns are striking visual interference effects created by the superposition of two regular, repetitive structures, such as line gratings. This simulator visualizes the fundamental case where two identical, translucent linear gratings are overlaid. Each grating consists of a series of parallel, equally spaced opaque lines on a transparent background, characterized by its line spacing or pitch. When a second grating is placed atop the first, the slight mismatch in their spacing or angular orientation produces a low-frequency beat pattern of alternating light and dark bands, known as the moiré envelope. The physics is one of spatial interference, governed by the geometry of the overlapping lines. For two gratings with pitches p1 and p2 and a relative tilt angle θ, the period of the resulting moiré pattern (Λ) can be approximated by Λ ≈ (p1 * p2) / sqrt(p1² + p2² - 2p1p2 cos θ). A key simplification is the use of a purely geometric, ray-optics model; it ignores wave-optical effects like diffraction and assumes perfect, binary transparency. By interacting with the controls for spacing, tilt, and lateral shift, students learn how small changes in the parameters of the component gratings lead to large, predictable changes in the moiré pattern. This demonstrates core principles of spatial frequency mixing, multiplicative superposition, and the concept of a beat frequency translated from time (as in sound) to two-dimensional space.

Who it's for: High school and introductory undergraduate physics students studying wave interference, optics, or periodic functions, as well as educators seeking a visual tool for spatial beats.

Key terms

  • Moiré pattern
  • Spatial frequency
  • Grating pitch
  • Superposition
  • Beat frequency
  • Interference
  • Periodic structure
  • Geometric optics

Gratings

14 px
15 px
6°
0 px
0.22

Two translucent rulings multiply into slow envelopes — the same beat idea as slightly mistuned tones, here in space.

Measured values

Beat scale ~210 px

How it works

High-contrast Moiré for demos: no diffraction physics, only geometry and perception — ideal for posters and hooks.

Frequently asked questions

Are moiré patterns a form of light interference like in the double-slit experiment?
No, the moiré patterns in this simulator are a result of geometric superposition, not wave interference. They arise from the multiplicative blocking and transmission of light through the overlaid opaque lines, similar to a Vernier scale. True optical interference requires coherent light waves and involves the addition of electric fields, which produces effects like diffraction.
Why do the moiré fringes appear much wider than the lines in the individual gratings?
The moiré pattern is a low-frequency 'beat' pattern resulting from the difference between the two grating frequencies. If the individual gratings have very similar spacings, their spatial frequencies are nearly equal. The beat frequency is the difference, which is much smaller, corresponding to a much larger wavelength or period. This is directly analogous to the audible beats heard when two similar musical tones are played together.
Where do we see moiré patterns in real life?
Moiré patterns are common when photographing or filming objects with fine repetitive details, like window screens, striped shirts, or digital images of computer screens. They are also used deliberately in precision measurement (e.g., strain analysis in materials science) and as a security feature on banknotes to prevent counterfeiting.
What does shifting one grating sideways do?
Laterally shifting one grating parallel to its lines does not change the moiré pattern's orientation or spacing, as the relative alignment of the lines remains consistent along the shift direction. However, shifting perpendicular to the lines or at an angle changes the phase of the superposition, causing the entire moiré fringe pattern to translate, often dramatically, across the field of view.
What is a key limitation of this geometric model?
This model treats gratings as having perfectly sharp, opaque lines and ignores the wave nature of light. In reality, at very small grating spacings (comparable to the wavelength of light), diffraction effects become significant. The observed pattern would then be a combination of geometric moiré and true wave interference, requiring a more complex physical optics analysis.