Grating Spacing (d)
833 nm 1200 lines/mm
200 nm (5000 l/mm)5000 nm (200 l/mm)
Incident Angle θi
0.0° (from grating normal)
Diffraction Order (m)
m=0 (zeroth/specular) always shown in diagram. Keyboard M cycles orders.
Number of Slits (N)
Resolving power R = |m| · N
Reference Wavelength
550 nm
Blaze Angle θB17.5°
Facet tilt for efficiency envelope calculation.
Diagram Options
Keyboard shortcuts
←/→ θi ±0.5°  |  ↑/↓ d ±10 nm  |  M next order  |  L Littrow  |  R reset
Grating Diagram — hover beam for angle
Diffraction Angle vs Wavelength — all propagating orders
Angular Dispersion |dθ/dλ| vs Wavelength
Blaze Efficiency Envelope
η(λ) ∝ sinc²[πa(sinθi+sinθm)/λ], a≈d·cosθB.
Multi-Slit Interference Pattern
I(θ) = [sin(Nβ/2)/sin(β/2)]² at reference λ. N limited to 20 for pattern visibility.
Grating Properties
Property Value Formula
Angles at Key Wavelengths — order m = +1
λ (nm) θm (°) dθ/dλ (°/nm) Δθ from 550 nm Colour
Export & Share
PNG exports the grating diagram canvas. CSV/JSON copy the full angular data for all visible wavelengths. Share URL encodes current grating state.
Data content

CSV contains: wavelength (nm), diffraction angle θm (°), angular dispersion (°/nm) for each 5 nm step.
JSON includes: grating parameters (d, lines/mm, θi, m, N, R, blaze angle) plus the complete angle table.

Tip: Pin the current state via Share URL, then change parameters to compare different grating configurations side by side in separate browser tabs.
Applicable standards & principles
Huygens–Fresnel Principle

Every point on a wavefront acts as a source of secondary spherical wavelets. The new wavefront is the envelope of these wavelets. Diffraction gratings exploit constructive interference of wavelets from periodic apertures.

Reference: A. Fresnel, Mémoire sur la diffraction de la lumière (1818).

Grating Equation — d(sinθi + sinθm) = mλ

The fundamental relation for diffraction gratings, derived from the condition that the optical path difference between adjacent slits equals an integer number of wavelengths. Valid for both transmission and reflection gratings.

Convention: positive angles on opposite sides of the grating normal for reflection gratings (spectrometer convention).

Reference: J. Fraunhofer, Neue Modification des Lichtes durch gegenseitige Einwirkung und Beugung der Strahlen (1821).

Rayleigh Criterion for Resolution

Two spectral lines of equal intensity are just resolved when the principal maximum of one falls on the first minimum of the other. For a grating: R = λ/Δλ = mN, where m is the order and N is the number of illuminated slits.

Reference: Lord Rayleigh, Phil. Mag., 8:261 (1879).

CIE 15:2004 — Colorimetry

The CIE 1931 2° Standard Observer colour-matching functions used to render the perceived colour of each diffracted wavelength. This tool uses the Wyman et al. (2013) piecewise Gaussian analytical approximation, valid 380–780 nm with <0.06% RMS error.

Reference: CIE 15:2004; C. Wyman et al., JCGT 2(2), 2013.

IEC 61966-2-1 — sRGB Colour Space

Monochromatic wavelength colours are converted from CIE XYZ to sRGB using the IEC 61966-2-1 3×3 matrix, brightness-normalised to display perceived hue/saturation independent of absolute luminance.

Reference: IEC 61966-2-1:1999.

ISO 12233 — Grating Test Targets

Standardised spatial frequency test charts used to measure optical system MTF. Gratings in spectroscopic instruments follow similar spatial frequency conventions (lines/mm) used in this tool.

Reference: ISO 12233:2017.

Echelle Grating Standards

Echelle gratings operate at high diffraction orders (m = 10–100) with large blaze angles (45–75°). They achieve very high resolving power R > 100 000 in compact spectrometer designs with cross-dispersion to separate overlapping orders.

Common in astronomical spectrographs (ESO HARPS: R = 115 000) and laser cavity tuning.

Reference: G.R. Harrison, JOSA, 39:522 (1949).

Mathematical formulations
Grating Equation
d · (sin θi + sin θm) = m · λ

Solving for θm:
sin(θm) = mλ/d − sin(θi)
If |sin(θm)| > 1 → evanescent (order does not propagate)

Zeroth order (m=0): θm = −θi (specular reflection)

Implementation: gratingAngle(d, θi, m, λ)

Angular Dispersion
m/dλ = m / (d · cos θm) [rad/nm]
= m · 57.296 / (d · cos θm) [°/nm]

Linear dispersion on focal plane (focal length f):
dx/dλ = f · dθm/dλ [mm/nm]

Higher orders and finer gratings produce greater angular separation. Example: d=833 nm, m=1, θm=40° → dθ/dλ ≈ 0.084 °/nm.

Free Spectral Range
ΔλFSR = λ / |m|

The wavelength range in one order before overlap with adjacent orders. For m=1: FSR = λ (no overlap in visible). For m=2: FSR = λ/2.

Resolving Power
R = λ / Δλ = |m| · N

Δλmin = λ / R = λ / (|m| · N)

Example: N=60 000, m=1 → R=60 000 → Δλ ≈ 0.009 nm at 550 nm. Enough to resolve the Na doublet (589.0/589.6 nm).

Littrow Condition
θi = θm
2d · sin(θ) = m · λblaze
θLittrow = sin−1(mλ / 2d)

The diffracted order returns along the incident beam. Simplifies monochromator and laser cavity optics.

Blaze Efficiency Envelope
η(λ) ∝ sinc²[πa(sinθi + sinθm) / λ]

a = d · cos(θB) (facet width for ruled grating)
θB = blaze angle (facet tilt)

Peak efficiency occurs near the blaze wavelength where the single-slit envelope maximum coincides with the grating order.

Multi-Slit Interference Intensity
I(θ) = [sin(Nβ/2) / sin(β/2)]²

β = 2π d sin(θ) / λ (phase between adjacent slits)
N = number of slits

Principal maxima occur when β = 2mπ. Between consecutive principal maxima there are N−2 secondary maxima and N−1 minima. Peak intensity = N².

CIE 1931 2° Observer — Piecewise Gaussian
g(λ; μ, σ1, σ2) = exp(−½ d² / σk²)
where d = λ − μ, σk = σ1 if d < 0 else σ2

x̄(λ) = 1.056·g(599.8,37.9,31.0) + 0.362·g(442.0,16.0,26.7) − 0.065·g(501.1,20.4,26.2)
ȳ(λ) = 0.821·g(568.8,46.9,40.5) + 0.286·g(530.9,16.3,31.1)
z̄(λ) = 1.217·g(437.0,11.8,36.0) + 0.681·g(459.0,26.0,13.8)

Source: C. Wyman, P.-P. Sloan, P. Shirley, JCGT 2(2), 2013.

Academic references & citations
  1. J. Fraunhofer, “Neue Modification des Lichtes durch gegenseitige Einwirkung und Beugung der Strahlen,” Denkschriften der Königlichen Akademie der Wissenschaften zu München, 8:1–76, 1821. First systematic study of diffraction gratings and the grating equation.
  2. A. Fresnel, “Mémoire sur la diffraction de la lumière,” Mémoires de l’Académie des Sciences, 5:339–475, 1818. Huygens-Fresnel diffraction theory underpinning grating operation.
  3. Lord Rayleigh, “Investigations in optics, with special reference to the spectroscope,” Philosophical Magazine, 8(49):261–274, 1879. Rayleigh criterion for spectral resolution.
  4. H. A. Rowland, “Preliminary Notice of the Results Accomplished in the Manufacture and Theory of Gratings for Optical Purposes,” Philosophical Magazine, 13(84):469–474, 1882. Concave diffraction gratings and ruling engine technology.
  5. G. R. Harrison, “The Production of Diffraction Gratings: II. The Design of Echelle Gratings and Spectrographs,” Journal of the Optical Society of America, 39(7):522–528, 1949. Echelle grating design for high-resolution spectroscopy.
  6. M. C. Hutley, Diffraction Gratings, Academic Press, 1982. Comprehensive monograph on grating theory, fabrication, and applications.
  7. E. G. Loewen, E. Popov, Diffraction Gratings and Applications, Marcel Dekker, 1997. Modern grating theory including efficiency, blazing, and holographic fabrication.
  8. C. Palmer, E. Loewen, Diffraction Grating Handbook, 8th Edition, MKS/Newport, 2020. Industry-standard reference for grating selection and spectrometer design.
  9. CIE, Colorimetry, 3rd Edition, CIE 15:2004. CIE 1931 2° Standard Observer colour-matching functions.
  10. C. Wyman, P.-P. Sloan, P. Shirley, “Simple Analytic Approximations to the CIE XYZ Color Matching Functions,” Journal of Computer Graphics Techniques, 2(2):1–11, 2013. Piecewise Gaussian approximation used in this tool for monochromatic colour rendering.
  11. IEC, Multimedia systems and equipment — Part 2-1: Default RGB colour space — sRGB, IEC 61966-2-1:1999. XYZ-to-sRGB matrix and transfer function used for colour display.
  12. E. Hecht, Optics, 5th Edition, Pearson, 2017. Standard optics textbook with multi-slit interference derivation.
Research & batch analysis
Batch grating survey

Automated survey across 14 standard grating spacings at normal incidence, m=+1, λ=550 nm. Each row computes: diffraction angle, angular dispersion, resolving power (N=1000), Littrow angle, visible band propagation coverage, and maximum usable order.

d (nm) l/mm θm (°) dθ/dλ R (N=1k) Littrow Vis % Max m
Research backend provides: Grating equation with full evanescent detection, angular dispersion curves, resolving power analysis, free spectral range calculation, Littrow mount geometry, blaze efficiency envelope (sinc² model), multi-slit interference intensity pattern, CIE 1931 monochromatic colour rendering, batch grating survey (14 spacings × all parameters), full CSV/JSON/PNG export. All computation is on-device with zero network dependency.