Based on second chapter of the book Optics by Example.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>