Beam-Reflections Simulation of a ray inside a rectangle Blog post about the problem: https://hilash.github.io/2019/10/21/lazer-beam.html The simulator: https://hilash.github.io/projects/lazer-beam/lazer-beam.html