Wiki / Dispersive & Apertures / Diffraction grating

Diffraction grating

Creates selected diffraction orders using the grating equation.

Open in the canvas →

Click the diffraction grating to see its live specs and try its parameters — this mini canvas can't be moved, deleted, or added to.

In the real world

A diffraction grating is a surface ruled with closely, evenly spaced lines (period d). Light diffracting from it interferes constructively only at angles satisfying the grating equation:

d(sinθi+sinθm)=mλd\,(\sin\theta_i + \sin\theta_m) = m\lambda
The grating equation: incidence angle θᵢ, diffraction angle θₘ, integer order m, line spacing d.

Because the equation depends on λ, each nonzero order spreads white light into a spectrum — the same effect a prism produces through dispersion, but from interference rather than refractive-index variation.

In OpticalSetup

This is one of the few components where OpticalSetup implements the textbook formula directly and exactly, solving the grating equation per sampled wavelength for every configured diffraction order, in either reflective or transmissive mode. Orders where the equation has no real solution (|sinθₘ| > 1) are simply dropped, matching a real grating's behavior of only lighting up the orders that geometrically exist.

Simplified vs. reality

Diffraction efficiency is split evenly across the configured orders rather than computed from the groove profile (a real blazed grating concentrates most of the light into one order by design) — order existence and angle are exact, relative brightness between orders is not.

Related components

Further reading