Skip to main content

Module waves

Module waves 

Source
Expand description

Electromagnetic wave propagation — plane waves, spherical waves, Gaussian beams, wave packets, interference, diffraction, and Snell’s law.

Structs§

GaussianBeam
Gaussian beam with a finite waist (focused beam).
PlaneWave
Plane electromagnetic wave: E and B perpendicular to propagation direction.
SphericalWave
Spherical electromagnetic wave emanating from a point source with 1/r decay.
WavePacket
Wave packet with a finite bandwidth (group velocity envelope).
WaveRenderer
Renderer for EM waves as animated color/brightness patterns.

Functions§

diffraction_single_slit
Single-slit diffraction intensity pattern (Fraunhofer). Returns normalized intensity at angle angle for 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.