Home▸Articles▸Colours & Light

Rainbow Formation in Mist: Ray Optics & Dispersion

Understanding how rainbows form involves principles of light refraction, internal reflection, and dispersion within water droplets.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What a Rainbow Is

A rainbow is an optical phenomenon caused by the refraction (bending) of light as it enters a water droplet, followed by internal reflection within the droplet and dispersion due to different wavelengths bending at slightly different angles. This process separates white light into its constituent colors, creating the familiar spectrum.

Rainbows typically appear in the sky after rain showers when sunlight passes through numerous small water droplets suspended in the air.

Why It Happens

The key to understanding rainbow formation lies in Snell's law of refraction, which describes how light changes speed and direction as it moves from one medium to another. When light enters a water droplet, it slows down and bends. Upon internal reflection within the droplet, some light exits at an angle that creates a spectrum due to dispersion.

The primary rainbow is formed when light undergoes two internal reflections inside the droplet before exiting. The secondary rainbow occurs with three internal reflections, resulting in a reversed color order.

live demo · related simulation● LIVE

Deriving the 42° Angle

To derive the approximate 42° angle for the primary rainbow, one must consider the minimum deviation condition where light undergoes two internal reflections and exits the droplet. This involves solving Snell's law twice at each interface (air to water and back) and accounting for the geometry of the droplet.

The exact derivation requires calculus and trigonometry but can be approximated using simple geometric principles, showing that the angle of deviation is minimized when light undergoes two internal reflections before exiting.

Real-World Examples

Rainbows are commonly observed after rain showers or in spray fountains. They can also appear around halos formed by ice crystals in the atmosphere, known as circumhorizontal arcs.

In scientific applications, understanding rainbow formation is crucial for designing optical instruments like spectrometers and raindrop size distributions in meteorology.

Frequently asked questions

How does dispersion affect the colors of a rainbow?

Dispersion causes different wavelengths (colors) of light to bend at slightly different angles as they pass through a water droplet, separating white light into its constituent colors.

Why do rainbows appear in the sky after rain showers?

Rainbows form when sunlight passes through numerous small water droplets suspended in the air. The combination of refraction, internal reflection, and dispersion within these droplets creates the colorful arc we see.

Can a rainbow be formed without water droplets?

Yes, rainbows can also form with ice crystals in the atmosphere, creating halos or circumhorizontal arcs. These are similar phenomena but occur due to refraction and reflection within ice crystals rather than water droplets.

Is it possible to see a secondary rainbow?

Yes, a secondary rainbow can be observed with three internal reflections inside the droplet, resulting in a reversed color order compared to the primary rainbow. It is fainter and appears at an angle of about 50.2°.

Try it live

Everything above runs in your browser — open Rainbow Formation in Mist: Ray Optics & Dispersion (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Rainbow Formation in Mist: Ray Optics & Dispersion (2D) simulation

What did you find?

Add reproduction steps (optional)