This application is built for simulating and demonstrating simple light behaviours: reflection, refraction in mediums of different shapes and refractive indices, including circles and polygons, lens behaviours and light filters
I have made every reasonable effort to implement and use efficient mathematical algorithms for detection of collisions, and for calculation of reflections, refractions, and other behaviours of light. However I am not a mathematician nor a computer science graduate, and there is a lot that needs to be improved for efficiency and even for physical accuracy. You might want to review some of the code and submit an issue on the GitHub repository. The readme file in the repository explains some of the algorithms used.