Reflection and Refraction

Click the "refresh page" icon to start a new calculation.

JavaScript simulated reflection and refraction


The JavaScript-simulation shows the incident, reflected, and refracted light rays on the flat surface of a half-cylinder. The incident ray (green) is marked with a small circle. The law of reflection is used to calculate the reflected ray (red). Snell's law is used to calculate the refracted ray (magenta), if it exists.

October 9th, 2022, Lie.