Modeling Double Slit Interference With Python

Rhett Allain
7 min readAug 13, 2023
Photo: Rhett Allain. Interference due to a diffraction grating because it looks cool.

The goal here is to model the pattern of light you get when a laser passes through a double slit. There’s a lot of stuff to do for this, so let’s get started.

Light as an Electromagnetic Wave

Of course light is an electromagnetic wave. That means it’s an oscillation of both the electric and magnetic fields. When the electric field changes…

--

--

Rhett Allain

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.