Sounds like a good project for a graduate level computational electromagnetics course. The method used in this app is FDTD, which is pretty easy to understand and implement compared to other methods for solving Maxwell's equations numerically[1].
[1] https://en.wikipedia.org/wiki/Computational_electromagnetics