Skip to content
Physics Medium #diffraction#grating#spectroscopy

Diffraction Grating

Many slits produce sharp orders of constructive interference - the basis of spectroscopy.

A free, animated diffraction grating you can read here or embed on any website, from Scrollchart.

Diffraction Grating

Diffraction Gratingd sin(theta) = m * lambda splits white light into sharp orders, one spectrum per order.

Available in: 日本語

Light hitting a multi-slit grating with output orders at angles where d sin(theta) = m*lambda. Three wavelengths (violet, green, red) fan out into discrete orders m = 0, +/-1, +/-2 on a screen. Spectroscopy application annotated.

Good for

  • Wave optics tutorials introducing multi-slit interference and resolving power
  • Spectroscopy and astrophysics courses explaining stellar absorption lines
  • Photonics articles on wavelength-division multiplexing in fiber networks

Source & accuracy

This diffraction grating is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

Multiple slits create sharp interference orders

A diffraction grating is a periodic array of many slits (or reflective grooves) spaced at regular intervals. Light passing through produces interference patterns sharper than a double-slit experiment because N slits contribute coherently. The constructive interference condition is d sin(theta) = m lambda, where d is the slit spacing, m is the order (0, 1, 2, ...), and lambda is the wavelength. At the angles satisfying this condition, light from all N slits arrives in phase and adds constructively, producing bright maxima. Between these maxima are dark minima where light from adjacent slits cancels. With hundreds or thousands of slits, the maxima become very narrow and bright, and each wavelength is diffracted to its own angle. This is why gratings are used in spectrometers and spectrographs: white light is spread into a sharp spectrum where each color appears at a precise angle determined by its wavelength.

Spectroscopy and modern applications

Transmission and reflection gratings are the workhorse dispersive elements in spectroscopy. A spectrograph with a grating can analyze light from stars, galaxies, or laboratory samples, revealing absorption or emission lines that indicate chemical composition and physical conditions. Holographic gratings, made by recording an interference pattern in photoresist, can have extremely fine line spacing and custom blazing (optimizing intensity in a particular order). Gratings are also used in wavelength-division multiplexing for fiber-optic communications: different wavelengths are combined onto a single fiber at a grating, transmitted, and then separated at the destination by another grating. The sharpness and efficiency of gratings make them superior to prisms for most applications where high spectral resolution is needed.

Embed this diagram

Add this animated diffraction grating to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated diffraction grating for any website.
Who uses it
Physics educators.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="diffraction-grating" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Diffraction Grating" for my website?
Scrollchart provides "Diffraction Grating" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a diffraction grating in WordPress or a static site?
Paste the HTML snippet from the Scrollchart diagram page into your WordPress post (in HTML/code view), your Webflow embed block, or directly into a static HTML file. No plugin is needed. The diagram loads from scrollchart.com and paints in as the reader scrolls.