About the Mirage and Layered Media simulation
Light crossing from one medium to another keeps n sin θ fixed. Through a stack of layers whose refractive index steadily falls, a ray bends further from the vertical at each boundary until n sin θ would exceed the next layer's index — and then it is totally reflected and turns back. With many thin layers, the zig-zag becomes a smooth curve.
This mirage simulation shows the layered slabs first, then the real effect. Air just above a hot road is less dense, so light from a tree curves up off the road and the eye sees an upside-down image below it, like water. Over a cold sea the layering is reversed and ships below the horizon appear lifted (looming).
Also covers: mirage, multiple slab refraction, total internal reflection in air, looming, n sin theta constant, hot road mirage.




