Road Mirage

2D twin of the 3D road: a ray diagram of light bending in the hot air layer, plus what the driver sees at the horizon.

Switch to 3D

Presets

Playback

Road, air and viewer

A hotter road and a thinner hot layer bend the rays more.

Model checks

The science

What is modelled

On a hot day the road heats the air just above it. Hot air is thinner, so its refractive index is slightly lower than that of the cooler air higher up. Light from the sky that travels almost horizontally toward your eye bends toward the higher index, that is upward, so a ray that heads down toward the road is turned back up before it touches it. Your eye follows the ray backwards in a straight line and sees a patch of sky below the horizon: the shimmering "water". The same happens to the light from a distant car, which then shows an upside-down twin beneath it. This is an inferior mirage.

Equations

  • Air temperature above the road: T(h) = Tair + (Ts − Tair) e−h/δ. Refractive index of air for visible light: n − 1 ≈ 77.6×10−6 P / T (P in hPa, T in K), about 2.7×10−4.
  • Light rays (Fermat's principle) in a medium whose index depends on height only: dx/ds = cosφ, dh/ds = sinφ, dφ/ds = (dn/dh) cosφ / n, integrated with fourth-order Runge-Kutta.
  • Snell's law for horizontal layers: n(h) cosφ = constant along a ray. A ray leaving the eye at height he and depression θ turns where n(h) = ne cosθ.
  • Critical angle: the ray that just grazes the road has cosθc = n(0) / n(he). Shallower rays turn upward before the road and appear as sky; the mirage begins where the grazing ray comes closest to the ground, typically a few hundred metres away.
  • In a linear gradient n = n0 + g h the path is a catenary: n(x) = C cosh(g (x − xt)/C), with C = n cosφ.

Checks run in the page

  • The Snell invariant n cosφ is monitored along a traced ray.
  • The RK4 ray is compared with the exact catenary in a linear gradient.
  • A ray from the car body, launched back with the direction reversed, returns to the eye (reciprocity).
  • The critical angle found by bisection on traced rays is compared with acos(n(0)/n(eye)).

Honest simplifications

  • The temperature profile is a single exponential of chosen thickness. Real profiles over a road change with wind, time and surface; a turbulent layer makes the image shimmer, which is only suggested here by a small wobble.
  • The air is horizontally uniform and the Earth is flat on this scale; refraction by the Earth's curvature and pressure changes with height are ignored. Wavelength dependence of n is ignored, so the image has no colour fringes.
  • The upside-down car is drawn as a mirrored copy scaled linearly from the traced image of two points of the car inside the range of heights the rays can reach; the true image is slightly distorted. Only a band of the car is imaged: rays that bend up in the thin hot layer leave it at about the critical angle, so far away the lowest part of the car lies in the shadow zone and cannot be seen at all. The sky patch on the road is a visual effect that starts at the computed grazing distance.
  • Only the lowest-order mirage is traced; with a stronger, thicker layer additional images can form.
What to try
  • Press Drive car: the upside-down twin shrinks and vanishes once the car is closer than the distance where the grazing ray touches the road.
  • Choose Cool road: with no temperature gradient the rays stay straight and there is no mirage.
  • Lower your eye height: the critical angle gets smaller, so the shimmering band narrows and starts farther away.
Air temperature above the road
Refractive index above the road
Critical angle against road temperature
Critical angle against eye height
Made with 🟠 Blender