Glass changes the path.
Light travels more slowly through glass than through air. At an angled boundary its direction changes: refraction. The dashed normal makes the angles easier to compare.
Explore & Experiment · Ages 12+
One beam. Many wavelengths. Follow light through glass, change its path, and discover why a prism opens a sunbeam into colour.
Turns from the incoming direction; + means clockwise.
White light: 31 sample rays across a continuous range.
Illustrative glass models, not calibrated products.
A thicker ray marks your selection within the mixture.
Measured from the entry-face normal, not its surface.
The angle between the prism’s two sloping faces.
REFRACTIVE INDEX · 550 nm
1.5185About 66% of the vacuum light speed.ANGLE INSIDE · AT ENTRY
30.3°Measured from the same entry normal.TOTAL TURN · AT EXIT
38.6°Exits the right face.The prism changes their directions by different amounts. Move the wavelength slider to follow one part of the mixture.
Light travels more slowly through glass than through air. At an angled boundary its direction changes: refraction. The dashed normal makes the angles easier to compare.
The glass’s refractive index depends on wavelength. In these models, shorter visible wavelengths bend more. A single wavelength bends, but does not split into a rainbow.
Light usually bends away from the normal on leaving glass for air. Above the critical angle it reflects inside instead. Try “Find a reflection” and follow the turn.
Try the reflection preset, then reduce the prism’s apex angle. Can you find where the selected ray starts to leave without an internal reflection?
n₁ sin θ₁ = n₂ sin θ₂
Snell’s law relates the angles on opposite sides of a boundary. Both angles are measured from the normal. The refractive index is n = c/v: the speed of light in vacuum divided by its speed in the material.
Inside glass, the critical angle for a glass–air boundary is θc = arcsin(1/n). If the internal incidence is larger, the transmitted ray is replaced by total internal reflection. In this experiment, changing the apex changes which face the ray meets and at what angle.
Selected-ray values will appear here.
The ray view calculates intersections with a triangular cross-section and applies Snell’s law at each boundary. It traces the transmitted route, switching to the reflected route when total internal reflection occurs. The main ray angles are not artificially spread. The separate exit-direction strip expands the angular range to make small differences readable; compare its degree labels rather than its width.
The glass models use n = A + B/λ², with λ in micrometres. Crown-like: A = 1.5046, B = 0.0042. Flint-like: A = 1.5940, B = 0.0098. These are illustrative Cauchy-type approximations over 400–700 nm, not measurements or fits to a named glass. Air is approximated as n = 1.
White light is sampled at 31 wavelengths. Real sunlight’s visible spectrum is continuous, extends beyond this displayed range, and is not perfectly uniform. Display colours are approximate and cannot reproduce every spectral colour. Thick lines and moving dots are visual guides: light beams are not normally visible sideways in clean air, and the dots do not simulate light’s speed, frequency, or photons. Frequency stays the same at a stationary boundary; wavelength inside glass becomes shorter.
Ordinary partial surface reflections, absorption, polarisation, diffraction and three-dimensional effects are omitted. Brightness is not a measured energy distribution. Up to eight internal encounters are traced. This is a geometric-optics model, not a full electromagnetic simulation.
A raindrop is round rather than triangular. In a primary rainbow, sunlight refracts into a drop, some reflects once inside, then refracts out. Many droplets in the right directions send different wavelengths to your eyes. This page models the prism only; it is not a raindrop simulation.
Continue with Leo, Pip, and Gidget in The Rainbow Hidden in a Sunbeam.
Read further in OpenStax University Physics: refraction and Snell’s law, dispersion, and total internal reflection. For rainbows: NOAA/NASA’s guide.
For a physical experiment, use an educational prism with adult guidance and watch the light projected on paper. Never look at the Sun or into a bright beam through a prism. Do not use a laser. This page works offline; only the reading and navigation links leave the page.