We describe an event-based approach to simulate the propagation of an electromagnetic plane wave through dielectric media. The basic building block is a deterministic learning machine that is able to simulate a plane interface. We show that a network of two of such machines can simulate the propagation of light through a plane parallel plate. With properly chosen parameters this setup can be used as a beam splitter. The modularity of the simulation method is illustrated by constructing a Mach–Zehnder interferometer from plane parallel plates, the whole system reproducing the results of wave theory. A generalization of the event-based model of the plane parallel plate is also used to simulate a periodically stratified medium.