↑ ↓ to move · enter to open

W08 · Optics · Refraction, reflection, dispersion

rainbows

Sunlight that enters a raindrop bends, bounces off the back, bends again and comes out heading roughly back toward the sun. The amount it turns depends on where it hit the drop, and that turn has a minimum. Light piles up at the minimum, so you see a bright ring 42° from the shadow of your head, with a fainter second ring at about 51°.

LAB 1

inside a raindrop

Parallel sunlight arrives from the left. Each ray hits the drop at an impact parameter b: its height above the center line, as a fraction of the radius. It refracts on the way in, reflects off the back once (or twice), and refracts on the way out. Slide b and watch how far the ray turns.

primary · 1 reflection
0.600

How to read this: top, sunlight comes from the left and passes through one raindrop. Your ray (amber) bends in, bounces off the back and comes out turned by D degrees in total. The gold ray is the one that turns the least, and that's where the rainbow comes from. "n" is how strongly water bends light.

Bottom, each point on the curve is one ray. Near the bottom of the dip the curve is flat, so a wide range of rays (gold bar on the axis) all come out at nearly the same angle (gold band, within 1° of the minimum). That pile-up is the bright bow.

  • your ray, set by the slider
  • the rainbow ray (least turned)
  • faint green: other rays, for comparison
  • center line of the drop; b is how far above it a ray enters

Try this: press Go to rainbow ray, then nudge the slider and watch D barely change.

—
Incidence i · refraction r
—
Deviation D of this ray
—
Seen at, from antisolar point
—
Minimum D (rainbow ray)

Snell's law and the turn

sin i = n sin r with n = 1.333 (589 nm)
each refraction turns the ray by i − r, each reflection by 180° − 2r
primary: D₁ = 180° + 2i − 4r secondary: D₂ = 360° + 2i − 6r

Why a bright ring

Near its minimum the curve is flat, so a wide range of b sends light out at nearly the same angle.

René Descartes worked out the 42° in 1637 by tracing rays through a sphere of water one at a time, the same calculation this lab does.

CodePython

from math import acos, asin, cos, degrees, pi, radians

def deviation(b, n, k):
    # ray hits the drop at impact parameter b (0 to 1)
    # and reflects k times inside; returns radians
    i = asin(b)          # incidence angle
    r = asin(b / n)      # Snell: sin i = n sin r
    # each refraction turns it i - r, each reflection pi - 2r
    return 2*(i - r) + k*(pi - 2*r)

def from_antisolar(D):
    # where the observer sees that ray, in degrees
    return 180 - degrees(acos(cos(D)))

def share_near_minimum(n, k, width=1.0, N=20000):
    # rays weighted by drop cross-section (weight ~ b);
    # fraction leaving within `width` degrees of min D
    bs = [(j + 0.5) / N for j in range(N)]
    Ds = [deviation(b, n, k) for b in bs]
    Dmin = min(Ds)
    near = sum(b for b, D in zip(bs, Ds)
               if D - Dmin <= radians(width))
    return near / sum(bs)
LAB 2

colors split

Water bends violet light a little more than red, so each color has its own refractive index and its own minimum deviation. The minimum has a closed form: set dD/di = 0, use Snell's law, and the rainbow ray's incidence angle drops out. Pick a wavelength and see where its ring sits.

angle from antisolar point
650 nm

How to read this: each color of light (wavelength in nm, nanometers) forms its ring at a slightly different angle. The strip on the right shows how the colors stack in the real sky.

—
Refractive index n(λ)
—
This color
—
Primary bow
—
Secondary bow

Minimum deviation

n(λ) = A + B/λ² A = 1.3239, B = 0.00309 µm²
dD/di = 0 ⇒ cos² i* = (n² − 1) / (k(k + 2))
primary θ = 180° − D₁(i*) secondary θ = D₂(i*) − 180°

The index model is a two-term Cauchy fit through water's index at 68°F for 656 nm (1.3311) and 405 nm (1.3428). It lands within about 0.0002 of the measured value at 486 nm. Temperature and dissolved salt shift n slightly, which moves the bow by small fractions of a degree.

Why the order flips

Red has the smaller n, so each refraction bends it less and its minimum deviation is smaller. For the primary, θ = 180° − D, so a smaller D puts red farther out. The secondary turns rays past 180°, so θ = D − 180°, and the same smaller D puts red on the inside.

CodePython

from math import acos, asin, cos, degrees, pi, sin, sqrt

def n_water(lam_nm):
    # Cauchy fit, water at 20 C; lambda in micrometres
    lam = lam_nm / 1000
    return 1.3239 + 0.00309 / lam**2

def deviation(b, n, k):                    # from Lab 1
    i, r = asin(b), asin(b / n)
    return 2*(i - r) + k*(pi - 2*r)

def bow_angle(n, k):
    # closed form: cos^2 i* = (n^2 - 1) / (k(k + 2))
    i = acos(sqrt((n*n - 1) / (k*(k + 2))))
    D = deviation(sin(i), n, k)
    return 180 - degrees(acos(cos(D)))

def bow_angle_numeric(n, k, tol=1e-10):
    # golden-section search for the minimum over b
    lo, hi, g = 0.0, 1.0, (sqrt(5) - 1) / 2
    while hi - lo > tol:
        a, c = hi - g*(hi - lo), lo + g*(hi - lo)
        if deviation(a, n, k) < deviation(c, n, k):
            hi = c
        else:
            lo = a
    D = deviation((lo + hi) / 2, n, k)
    return 180 - degrees(acos(cos(D)))
LAB 3

where rainbows appear

Stand with the sun at your back and look at falling rain. The antisolar point is the spot directly opposite the sun, where the shadow of your head falls. Every drop that sits 42° from it sends you primary-bow light, so the bow is a circle around that point. Raise the sun and the whole circle sinks.

side view · sun behind you
18°

How to read this: top, a side view of you, the sun and the rain. Bottom, what you'd see facing away from the sun. The bows are circles centered on the gold cross (your head's shadow), and the ground hides the rest (dashed).

  • where you look to see the main bow
  • where you look for the fainter second bow
  • faint wedge: brighter sky inside the main bow

Try this: click Sun at 42° and watch the main bow sink out of sight.

—
Top of primary bow
—
Top of secondary bow
—
Primary circle above horizon
—
Primary meets horizon at

Visible arc

top of bow = θ − h (gone when h ≥ θ)
above horizon where cos φ > tan h / tan θ
feet at azimuth ±arccos(cos θ / cos h)

Readouts use yellow light (589 nm): θ = 42.1° primary, 50.8° secondary. h is the sun's elevation, φ runs around the circle, azimuth is measured from the direction opposite the sun.

Alexander's dark band

Once-reflected rays can reach any angle inside 42° but none outside it, so the sky inside the primary is brighter. Twice-reflected rays only reach angles beyond about 51°. Between the two bows neither sends light your way, and the sky there is darker. The band is named for Alexander of Aphrodisias, who described it around AD 200.

Rainbows need low sun and rain on the opposite side at the same time. Late-day showers moving east, like the storms in W05 · Thunderstorms, often leave one behind. The model assumes spherical drops and a point sun; the sun's 0.5° disk smears each color by about that much.

CodePython

from math import acos, cos, degrees, radians, tan

def visible_arc(sun_elev, theta):
    # sun_elev, theta in degrees; theta = bow radius
    top = theta - sun_elev               # elevation of bow top
    if top <= 0:
        return top, 0.0, None            # bow below horizon
    h, t = radians(sun_elev), radians(theta)
    # points on the circle with cos(phi) > tan h / tan t
    arc = 2 * degrees(acos(tan(h) / tan(t)))
    # where the bow touches the horizon, from antisolar azimuth
    foot = degrees(acos(cos(t) / cos(h)))
    return top, arc, foot