Home / Science / Physics / Optics and photonics / Diffraction pattern generatorTool #933

Diffraction pattern generator: single slit, double slit, grating and circular hole, Fraunhofer and Fresnel

See and measure the light pattern from a single slit, a double slit, a grating or a round hole on a screen at any distance: the picture, the irradiance profile, fringe spacing, the Airy disc, grating orders and resolving power, in the far field (Fraunhofer) or near field (Fresnel).

Keep it one tap away for everyday use.

Bookmark Diffraction pattern generator?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Aperture
  2. Distance
  3. Pattern
  4. Profile
Nothing is uploadedWorks offline once open

Aperture and screen

Slits are long and narrow, lit by a plane wave of one wavelength. The Fresnel pattern is the paraxial near-field result at the exact distance; it turns into the far-field (Fraunhofer) pattern when the Fresnel number is small. The example values are made up.

Pattern

Irradiance is relative to the light falling on the aperture (1 = as bright as with no aperture at all). The picture colour is an approximate rendering of the wavelength. Scalar, paraxial diffraction; very wide angles (large orders of fine gratings) are approximate. For study and planning.

Download

What it does

Light passing through a small opening spreads out and interferes with itself, painting bright and dark bands on a screen. This generator works out that pattern for the four classic openings:

  • a single slit (a bright central band with fainter bands on each side),
  • a double slit (Young’s fringes inside the single-slit envelope),
  • a grating of N slits (sharp bright orders),
  • a circular hole (the Airy disc and its rings).

It shows the pattern as a picture in the light’s own colour and as an irradiance profile, both relative to the light falling on the aperture. You can see the far-field (Fraunhofer) pattern, the exact near-field (Fresnel) pattern at your screen distance, or both together.

How to use it

  1. Choose the aperture and type the wavelength (532 nm green laser pointer, 633 nm red helium-neon, 650 nm red pointer).
  2. For slits give the slit width a and, for two or more slits, the spacing d from centre to centre; for a grating, the number of slits N. For a hole, the diameter D in millimetres.
  3. Give the screen distance in metres and how much of the screen to show.
  4. Choose linear brightness to see the pattern as the eye does, or logarithmic to bring out the faint outer fringes.

What the results mean

  • Fresnel number N_F = (half-width)²/(λz): below about 0.1 the screen is in the far field and the simple Fraunhofer formulas hold; above 1 you are in the near field, where the pattern depends on distance in more complicated ways.
  • Fringe spacing λz/d: the distance between bright double-slit fringes.
  • Envelope first minimum at sin θ = λ/a: the edge of the central band of a single slit.
  • Missing orders: when d/a is a whole number, that fringe falls exactly on a dark point of the slit envelope.
  • Airy disc: the first dark ring of a round hole at sin θ = 1.22 λ/D, the diffraction limit of telescopes and cameras.
  • Resolving power of a grating is mN: two lines Δλ apart are just resolved when λ/Δλ = mN.

Worked example

The made-up example is a double slit with 40 µm slits 200 µm apart, lit by a 532 nm laser, on a screen 1 m away. The Fresnel number is 0.0271, so this is the far field and the dashed and solid curves lie on top of each other. The page shows fringes every 2.66 mm, the envelope’s first minimum 13.3 mm from the centre (a central band 26.6 mm wide), and 9 bright fringes inside it: d/a = 5, so the 5th order is missing. The peak irradiance is 0.0120 × the incident light.

Switch to a circular hole of 0.2 mm and the Airy disc radius is 3.24 mm. Make the hole 2 mm instead: the Fresnel number becomes 1.88, nearly two Fresnel zones are open, and the centre of the pattern is almost dark (0.141 × incident), something the far-field formula can never show.

Tips

  • Doubling the distance doubles the size of a far-field pattern but makes it four times fainter.
  • A narrower slit makes a wider pattern: diffraction is strongest when the opening is close to the wavelength.
  • For a grating, many slits make the orders sharp; the slit width sets which orders are bright.

FAQ

Why is the Fresnel curve different from the far field? Close to the aperture, light from different parts of the opening arrives with different curvature of the wavefront. The Fresnel calculation includes that; Fraunhofer assumes the screen is very far away.

How accurate is it? It is scalar, paraxial diffraction theory, excellent for small angles. Very fine gratings at large angles, and apertures close to the wavelength, need full electromagnetic models. For study and planning.

Where the numbers come from

  • Fraunhofer patterns of slits, gratings and circular apertures, Fresnel diffraction with Fresnel integrals and the Fresnel-Kirchhoff integral for a circular aperture: standard textbook results, for example Hecht, E., Optics, chapter 10, and Born, M. and Wolf, E., Principles of Optics, chapter 8.
  • Fresnel integrals by series and a continued fraction, Bessel functions by series and Hankel's asymptotic expansion: standard numerical methods (Abramowitz and Stegun, chapters 7 and 9).
  • Checked against SciPy (scipy.special j0, j1 and fresnel, and scipy.integrate.quad of the Fresnel integrals) and closed forms (on-axis 4 sin² law, 1.22 λ/D, minima at λ/a); no data tables are used. Example values are made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Gaussian beam calculator #930 Put lenses and curved mirrors on an optical rail and follow a laser beam through them with the complex beam parameter q and ABCD matrices: the size and position of every new waist, Rayleigh range, divergence, beam radius and wavefront curvature anywhere, with M² for real lasers. Lens ray tracer #932 Type a lens system as a list of spherical surfaces and trace exact rays through it: focal length, f-number, image position, a spot diagram against the Airy disc, spherical aberration, ray fans, best focus, distortion and Petzval field curvature, drawn as a lens layout. Spectrometer calibration #937 Open a photo from a phone or webcam spectrometer, take a brightness profile across the spectrum, find the bright lines, match them to well-known mercury, neon, hydrogen or sodium lines, and fit a pixel-to-wavelength polynomial to get a calibrated spectrum. Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Spectral line identifier #70 Paste a spectrum or a list of wavelengths and match each line to hydrogen, helium, metals, nebular lines, lamps, light pollution or the atmosphere, and find the redshift where several lines agree. Thin-film coating simulator #931 Stack thin layers on glass and see how much light they reflect and transmit at every wavelength and angle, for s, p or unpolarised light, by the transfer-matrix method: anti-reflection coatings, Bragg mirrors, soap films and thin absorbing layers.