# All the Way Across the Sky

What’s in a rainbow? Fairytales and pixie dust? Gold and leprechauns? A boatload of drugs? Nope, just clear cold geometry and physics, just how we like it.

Rainbows are a funny phenomenon. Everyone vaguely knows they have something to do with sunlight and water. But why should sunlight haphazardly reflecting from water produce such a clearly-defined ring, with the colours all nicely separated? Surely if the sunlight was bouncing off of all of the raindrops in the sky we should just be seeing some crazy fuzzy mess?

To get a handle on what’s going on, let’s look at what happens when light hits a spherical drop of water. Typical raindrops are around 1 mm in size, which is thousands of times larger than the wavelength of visible light and we can be comfortable using a geometric optics approach where the light is approximated by discrete ‘rays’.

Now rainbows always appear on the opposite side of the sky to the sun. The reason is that sunlight reflects from water in the air, back into your eye, as sketched below. What we need to do is work out how the light reflects back given the geometry of a spherical rain drop.

Suppose a light ray hits a drop of radius $a$ a distance of $y$ from the centre (we only need to consider 1 side due to symmetry): The light ray enters the drop and is deflected by a small angle $A$ due to the differing refractive index $n$ of the water drop (roughly 1.33 for visible light). The ray then bounces once inside, and is deflected by an angle $B$. Finally the ray leaves the drop and again is deflected due to the change in refractive index, this time by an angle $C$.

As the dashed lines are all radii of the circle, we immediately know all of the angles inside the drop

By Snell’s Law we know that the angles $\theta_1$ and $\theta_2$ are given by $\sin\theta = n\sin\theta_1$ $n\sin\theta_1 =\sin\theta_2 \Rightarrow \theta_2 = \theta$.

From geometry we also know that $A = \theta - \theta_1$ $B = \pi - 2\theta_1$ $C = \theta_2 - \theta_1 = \theta - \theta_1 = A$.

Finally, the deflection angle $\theta_d$ between the light ray going in and the light ray going out is just $\theta_d = \pi - (A + B + C) = 4\theta_1 - 2\theta$.

Phew! That GCSE circle geometry comes in useful after all. What we want to know is the relation between the incidence position $y$ and the deflection angle $\theta_d$. To proceed note that $\sin\theta = \frac{y}{a}$ $\sin\theta_1 = \frac{y}{na}$

so $\theta_d = 4\arcsin\left(\frac{y}{na}\right) - 2\arcsin\left(\frac{y}{a}\right)$.

This function is plotted below, and looks like it makes sense. For $y = 0$ the deflection is 0, the ray just bounces straight back no matter what the refractive index. For all $n > 1$ where there is some reflection the deflection angle gets larger as you move farther up the droplet. However, the fact that the angle starts to decrease again is critical. We’d like to know how much power reflects at every angle. The angle is represented in terms of $y$ because we know that the light power is equally distributed along the $y$ direction. The sun is very far away, so the rays are almost exactly parallel and straight. We therefore know that over a distance $\Delta y$, there is some amount of light power $\Delta P$, and this is constant – this is the assumption of straight parallel rays. What we’d like to know is how much of this power goes into each angle, for which we need: $\frac{dP}{d\theta_d} =\frac{dP}{dy}\frac{dy}{d\theta_d} =const \times \left(\frac{d\theta_d}{dy}\right)^{-1}$

The light intensity coming out of the droplet will therefore diverge when $\frac{d\theta_d}{dy} = 0$. As plotted below for water this divergence is very sharp, and is essentially caustic focussing of the incoming rays. What this means for our rainbow is that all the light we see comes from one angle, in a very narrow band.  The reason it’s a circle is due to the spherical symmetry of a rain drop. This explains why rainbows are so sharp and neatly contained, and the reflection of light doesn’t end up in a big mess on the sky. We can calculate this condition, and it occurs for a critical position $y_{crit} = na\sqrt{\frac{1}{3}\left(\frac{4}{n^2} - 1\right)}$.

We can substitute this into our expression for $\theta_d$ and find the critical angle at which point the reflections are brightest $\theta_{crit} = 4\arcsin\left(\sqrt{\frac{1}{3}\left(\frac{4}{n^2} - 1\right)}\right) - 2\arcsin\left(n\sqrt{\frac{1}{3}\left(\frac{4}{n^2} - 1\right)}\right)$. Slightly surprisingly, as the refractive index goes up and the light gets more strongly focussed, the angle at which most light is reflected goes down. For water we have $\theta_{crit} = 42^{\circ}$ (which agrees with Wikipedia, yay!), for higher refractive indicies the rainbow would shrink dramatically. Also of note is that the $y$ term only appears in the combination $y/a$, which means this reflection angle is independent of drop size. All of the rain drops in the sky (assuming they’re spherical) will then reflect at the same angle! This is nice to know, and helps us understand why rainbows are so neatly contained. A final point to mention is that the refractive index of water changes very slightly for different wavelengths. Each wavelength has its own critical angle, but they’re all slightly different. Each colour then gets assigned its little spot in the rainbow

Now from a previous post I know I have the computational machinery to directly simulate electromagnetic waves, so lets see what this looks like for a water drop. For computational reasons I’ll have to scale the drop down pretty small, only 30 $\mu$m, but it’s still quite a few times the light wavelength so hopefully the geometric results here will hold. Light is injected from the left, with a flat wavefront to approximate the sun’s rays. For simplicity of visualisation only the top half of the drop receives light, the bottom half would look the same but flipped. The result is very nice! We see the light enter the drop, bend downwards, reflect from the back surface then exit out of the bottom. It’s also clear there’s are a few things we neglected to mention – transmission at the back surface and secondary reflections inside. They don’t change our reasoning behind $\theta_{crit}$ as the reflection coefficients are much less important than the geometric focussing power of the drop in determining the angle of peak intensity. However it’s clear most of the light leaves the drop at the back, which also makes sense as rainbows are much fainter than the sun! There is also a second reflection, and from the geometric results above we just need to add another bounce $B$ to calculate the angle for double reflections: $\theta_d^{double} = 6\arcsin\left(\frac{y}{na}\right) - 2\arcsin\left(\frac{y}{a}\right) - \pi$.

I’ll leave it as an exercise to the reader to find the critical angle for double reflections, but it does exist and is larger than the one for single reflections. This then creates a second rainbow outside the first, and the extra bounce means all of the colours are inverted.

## 3 thoughts on “All the Way Across the Sky”

1. Eileen says:

I remember having a lecture on this when I was at maths summer school with the OU! Not that I can remember much about it 20 yrs on!

Like

2. Sm4o says:

That’s brilliant! I love your animation. Did you use Processing language?

Like

1. jasmcole says:

Thanks! This was all simulated and visualised in Matlab, though I’ve been looking at processing. Would you recommend any learning resources?

Like