Expand description
Electromagnetic wave propagation — plane waves, spherical waves, Gaussian beams, wave packets, interference, diffraction, and Snell’s law.
Structs§
- Gaussian
Beam - Gaussian beam with a finite waist (focused beam).
- Plane
Wave - Plane electromagnetic wave: E and B perpendicular to propagation direction.
- Spherical
Wave - Spherical electromagnetic wave emanating from a point source with 1/r decay.
- Wave
Packet - Wave packet with a finite bandwidth (group velocity envelope).
- Wave
Renderer - Renderer for EM waves as animated color/brightness patterns.
Functions§
- diffraction_
single_ slit - Single-slit diffraction intensity pattern (Fraunhofer).
Returns normalized intensity at angle
anglefor given slit width and wavelength. - fresnel_
coefficients - Fresnel coefficients for reflection and transmission (s-polarization, intensity). Returns (reflectance, transmittance).
- interference_
pattern - Compute the interference pattern of two plane waves at a set of points.
- snells_
law - Compute the refracted angle using Snell’s law: n1sin(θ_i) = n2sin(θ_t). Returns None for total internal reflection.
- standing_
wave - Standing wave: superposition of two counter-propagating waves.