Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

diffraction_single_slit

Diffraction


Description

Diffraction of optical radiation passing through a single slit can be computed with function diffraction_single_slit(), which implements Fraunhofer's equation. Diffraction plus interference for a pair of slits can be computed with diffraction_double_slit().

Usage

diffraction_single_slit(w.length, slit.width, angle)

diffraction_double_slit(w.length, slit.width, slit.distance, angle)

Arguments

w.length

numeric Wavelength (nm).

slit.width

numeric Width of the slit (m).

angle

numeric vector Angle (radians).

slit.distance

numeric Distance between the centres of the two slits (m).

Value

A numeric vector of the same length as angle, containing relative intensities.

Examples

diffraction_single_slit(w.length = 550,
                             slit.width = 1e-5,
                             angle = 0)

# use odd number for length.out so that 0 is in the sequence
angles <- pi * seq(from = -1/2, to = 1/2, length.out = 501)

plot(angles,
     diffraction_single_slit(w.length = 550, # 550 nm
                             slit.width = 6e-6, # 6 um
                             angle = angles),
     type = "l",
     ylab = "Relative irradiance (/1)",
     xlab = "Angle (radian)")

plot(angles,
     diffraction_double_slit(w.length = 550, # 550 nm
                             slit.width = 6e-6, # 6 um
                             slit.distance = 18e-6, # 18 um
                             angle = angles),
     type = "l",
     ylab = "Relative irradiance (/1)",
     xlab = "Angle (radian)")

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.