A rainbow forms when sunlight enters a spherical raindrop, refracts, reflects once off the inside back surface, and refracts again on the way out. Because water's refractive index is slightly different for each color, each color exits at a very slightly different angle — spreading white light into a spectrum.
This simulation traces the actual ray path through a single raindrop using Snell's law at both refractions and the law of reflection at the internal bounce — the separation between red and violet you see comes from real dispersion (a genuine, small difference in water's refractive index for each color), not an artistic color gradient.
For one internal reflection the rainbow ray is at angle 4r − 2i from the line pointing away from the Sun, where cos²i = (n² − 1)/3 and sin r = sin i/n.
| Colour | Refractive index of water | Angle of incidence i | Rainbow angle |
|---|---|---|---|
| Red (656 nm) | 1.3311 | 59.5° | 42.4° |
| Yellow (589 nm) | 1.333 | 59.4° | 42.1° |
| Green (546 nm) | 1.3345 | 59.3° | 41.9° |
| Blue (486 nm) | 1.3371 | 59.2° | 41.5° |
| Violet (405 nm) | 1.3435 | 58.8° | 40.6° |
Conditions: spherical raindrop, one internal reflection, approximate refractive indices of water at 20 °C.
Puzzle 1. 🌈 You can never actually walk toward a rainbow and reach it — it always appears to stay the same distance away, no matter how far you travel toward it. Why is a rainbow fundamentally impossible to physically reach or touch?
Puzzle 2. 👥 Two people standing next to each other, looking at the exact same rainbow, are technically NOT looking at the exact same physical raindrops to see the "same" rainbow. Why is each person's rainbow, in a genuine sense, actually their own personal, individual rainbow?
Puzzle 3. 🎨 A rainbow always shows red on the outer (upper) edge and violet on the inner (lower) edge, in that exact same consistent order — never reversed. Why does this specific color ordering happen consistently, rather than being random or varying between rainbows?
Puzzle 4. 🌈🌈 A fainter, larger "secondary" rainbow sometimes appears above the main (primary) rainbow, with its colors in the OPPOSITE order (violet outside, red inside) — genuinely reversed compared to the primary rainbow. What causes this second, color-reversed rainbow to form?
Puzzle 5. ☀️ Rainbows are only ever visible when the sun is relatively low in the sky (roughly behind the observer), and you generally can't see a rainbow at solar noon when the sun is high overhead. Why does the sun's position matter so critically for whether a rainbow is visible at all?
Problem 1 (NEET level). 📘 Light enters a spherical raindrop (n=1.33) at incidence angle 59.6°. Using Snell's law, find the refraction angle inside the drop.
Problem 2 (JEE Main level). 📗 Using the total deviation formula D=180+2θᵢ−4θᵣ for a single-internal-reflection ray, find D for the values from Problem 1.
Problem 3 (WBJEE level). 📙 The visible rainbow angle, as seen by an observer, equals 180° minus the minimum deviation angle. Using the accurate minimum deviation of 137.5°, find the rainbow's visible angle.
Problem 4 (CBSE Class 10 level). 📕 Violet light has a slightly higher refractive index in water (n≈1.343) than red light (n≈1.331). Which color would you expect to have a slightly smaller rainbow angle, based on this difference?
Problem 5 (JEE Advanced style). 📓 If the primary rainbow's angle is 42°, and the secondary rainbow (formed by two internal reflections) appears at approximately 51°, find the angular gap between the primary and secondary rainbows as seen in the sky.
German monk Theodoric of Freiberg conducted careful experiments using water-filled glass spheres to model raindrops, correctly working out that a rainbow forms from light refracting and internally reflecting within each individual drop — a genuinely sophisticated result for the era.
René Descartes provided a rigorous mathematical derivation of the rainbow's angle using Snell's law (independently discovered around the same time), correctly calculating the 42° primary rainbow angle from first principles.
Isaac Newton used a glass prism to demonstrate that white sunlight is actually composed of all the visible colors combined together, and that each color bends by a slightly different amount when refracted — providing the essential missing piece explaining exactly why rainbows show distinct, separated colors.
Modern atmospheric optics continues to study more subtle rainbow-related phenomena — supernumerary bows (faint extra bands near the primary rainbow, caused by wave interference effects beyond simple ray optics), all building on the same foundational refraction-and-reflection framework established by Theodoric, Descartes, and Newton.