A broken straw
Stand a straw in a glass of water and look from the side. Where it enters the water it seems to kink, as if snapped. The straw is fine. What changes direction is the light coming from it: it travels from water into air on its way to your eye, and it bends at the boundary. Your brain assumes light travels in straight lines, so it places the underwater part of the straw in the wrong place. The same trick makes a swimming pool look shallower than it is, by about a quarter.
That bending at a boundary is refraction, and it happens whenever light crosses from one transparent material into another at a slant.
Slower in glass
Light travels at almost 300,000 kilometres a second in empty space and nearly as fast in air. In water it slows to about three quarters of that, and in ordinary glass to about two thirds. The ratio between light’s speed in a vacuum and its speed in a material is the material’s refractive index, n: 1.33 for water, about 1.5 for glass, 2.42 for diamond.
Think of a beam as a broad marching front. When it meets glass at a slant, one edge of the front enters first and slows down while the other edge is still racing through air. The front swings round, like a column of marchers wheeling as one end steps onto mud. Head-on, both edges slow together and the beam goes straight through without bending.
Snell’s law
The bend is not arbitrary. Measure each angle from the normal, the line standing square to the surface, and the angles obey
n₁ sin θ₁ = n₂ sin θ₂.
Going into a material with a higher index, the beam bends towards the normal; coming out, it bends away. The Persian scholar Ibn Sahl described this relationship in the 10th century, and Willebrord Snellius found it again in 1621. The scene’s angles are calculated from this rule at every surface the beam meets.
Try it: choose Into glass, set the Angle of incidence to 60°, then switch the Refractive index from Water to Diamond. Choose On under Show normals and angles to read both angles as the beam bends harder.
Notice also the faint second beam. Some light always bounces off a surface instead of crossing it: about 4 per cent at glass meeting light head-on, and more at grazing angles.
Trapped inside
Now choose Out of glass. The beam enters the curved side of the half-cylinder along a radius, so it does not bend there, and meets the flat face from inside. Coming out, it bends away from the normal, and as you steepen the angle the outgoing beam swings closer to skimming along the surface. At the critical angle it would leave exactly along the surface: about 49° for water, 42° for glass, 24° for diamond. Beyond it, Snell’s law has no answer, and every bit of the light reflects back inside. This is total internal reflection, and it is perfect: no mirror coating comes close.
Optical fibres use it to carry light for kilometres, bouncing off their walls at grazing angles. Diamond’s small critical angle traps light that enters it until it finds a way out through a facet, which is part of why a well-cut diamond sparkles.
What this model leaves out
The scene follows one narrow beam of a single colour, so it hides dispersion: the index is slightly different for each colour, which is what splits white light in a prism. Real light is also a wave, and a little of it leaks a fraction of a wavelength past a totally reflecting surface; the scene draws only rays. Real beams are only visible where dust or haze scatters them, and the strength of a reflection also depends on how the light is polarised, which the model averages away.
