← Back to Maxwell

Chapters

Interactive explorations of electrodynamics, pairing live simulations with guided explanations. No prerequisites beyond curiosity.

The simulator

Every simulation solves Maxwell's equations on a 2D grid in real time. Each cell updates based on the fields of its neighbors. Waves, reflections, interference all emerge from those local update rules. Nothing is faked.

An electromagnetic wave has two fields: the electric field E and the magnetic field H. A changing E creates H, a changing H creates E, and together they propagate.

In 3D, E and H each have three components. In 2D, Maxwell's equations split into two independent polarizations. We use TM mode: E points out of the screen (Ez) and H lies in the plane (Hx, Hy). That's why there's no Ex or Ey. The other polarization (TE mode) swaps the roles: H out of the screen, E in the plane.

By default you see Ez. Bright is positive, dark is negative, gray is zero. Press F to cycle through Ez, Hx, Hy, |H|, and energy density.

F field component · C colormap · Space pause · R reset

  1. Waves
    What electromagnetic waves are, how they propagate through space, and the relationship between frequency and wavelength.
  2. Boundaries
    What happens when a wave meets a material. Reflection, refraction, and how light bends.
  3. Interference & Diffraction
    How waves combine, cancel, and create intricate patterns when passing through slits.
  4. Total Internal Reflection
    Trapping light inside a medium, waveguides, fiber optics, and evanescent coupling.
  5. Resonance
    Standing waves, cavity modes, ring resonators, and photonic crystal defect cavities.
  6. Scattering
    Plane waves hitting obstacles. Rayleigh and Mie scattering, shadows, and size dependence.
  7. Engineered Media
    Graded-index optics, Luneburg lenses, Maxwell's fish-eye, and photonic crystal waveguides.
  8. Antennas
    Dipole radiation, phased arrays, beamforming, and reflector antennas.