Rainbow Formation Visualization

Interactive simulation of rainbow formation through refraction, reflection, and dispersion in water droplets

Water Droplet Cross-Section

Observed Rainbow Arc

Light Path Information

Incident Angle (i): 0.0°
Refraction Angle (r): 0.0°
Deviation Angle (D): 0.0°
Red Light Angle: 42.0°
Violet Light Angle: 40.0°

Optical Parameters

Light Parameters

Medium Parameters

Display Options

Preset Scenarios

Rainbow Physics Equations

Snell Law: n₁sin(i) = n₂sin(r)
Deviation Angle: D = 180° - 2i + 4r
Minimum Deviation: D_min ≈ 42° (red), 40° (violet)
Dispersion: n_red < n_violet

How Rainbows Form

A rainbow is an optical phenomenon that occurs when sunlight enters water droplets in the atmosphere. The light is refracted at the air-water interface, reflected internally at the back of the droplet, and refracted again as it exits the droplet. Different wavelengths are refracted at slightly different angles due to dispersion, creating the familiar spectrum of colors.

The Three-Step Process

Rainbow formation involves three optical processes: refraction as light enters the droplet, internal reflection at the back of the droplet, and second refraction as light exits the droplet. The primary rainbow we commonly see involves one internal reflection, creating a 40-42 degree angle.

Why Red is Outside and Violet is Inside

Red light has a lower refractive index in water and exits at about 42 degrees. Violet light has a higher refractive index and exits at about 40 degrees. This creates the classic ROYGBIV pattern from outer to inner edge.

Observation Conditions

To observe a rainbow, the sun must be behind you and rain droplets must be in front of you. The rainbow is always centered on the antisolar point.

Secondary Rainbow

A secondary rainbow can form when light undergoes two internal reflections inside the droplet. The colors are reversed and it appears at 50-53 degrees.