🧠Cerebite

Refraction and Prism Lab

Move the light and see how much it bends at a boundary and when it cannot get out at all. Then split white light into a spectrum, find the rainbow angle in a raindrop and steer a laser with prisms in a puzzle game.

Pick the material above and below the boundary, then drag the light (or use the slider) to change the angle of incidence. Angles are measured from the dashed normal line. Go from a dense material to a lighter one and push the angle past the critical angle to see total internal reflection.

Light comes from (top)
Light goes into (bottom)
Incident ray Reflected ray (brightness = reflectance) Refracted ray Normal
Angle of incidence
Angle of refraction
Critical angle
Light reflected
Speed of light (top)
Speed of light (bottom)

What refraction is

Light travels at about 300,000 km per second in a vacuum, but more slowly inside matter: about 225,000 km/s in water, 200,000 km/s in glass and only 124,000 km/s in diamond. The refractive index n says how many times slower: n = speed in a vacuum ÷ speed in the material. Air is almost exactly 1.00, water 1.33, ordinary glass about 1.50 and diamond 2.42.

When a beam crosses a boundary at an angle, one edge of it reaches the new material first and changes speed first, so the whole beam swings to a new direction — like a row of marchers stepping from pavement onto sand at a slant. That turn at the boundary is refraction. A beam that hits the boundary straight on, at 0°, changes speed but keeps its direction, which the lab shows when you drag the light to the normal line.

Snell's law step by step

The amount of bending follows Snell's law: n₁ sin θ₁ = n₂ sin θ₂, where both angles are measured from the normal, the line perpendicular to the surface. Take light going from air into glass at 40°. Then 1.00 × sin 40° = 1.50 × sin θ₂, so sin θ₂ = 0.643 ÷ 1.50 = 0.429 and θ₂ ≈ 25.4°. The light has bent toward the normal because it slowed down.

A quick rule covers most questions: into a slower material (higher n) light bends toward the normal; into a faster one it bends away. The refraction lab writes this calculation out for every angle you choose, shows the speed on each side and draws the weak reflected ray whose brightness comes from the Fresnel equations — about 4% for glass at normal incidence, rising sharply at grazing angles.

The critical angle and total internal reflection

Now reverse the trip: light leaving glass for air bends away from the normal, so the refracted ray is always tilted more than the incoming one. At some angle of incidence the refracted ray lies flat along the surface (90°). That angle is the critical angle, given by sin θc = n₂ ÷ n₁. For water into air it is 48.8°, for glass 41.8° and for diamond only 24.4°.

Go past the critical angle and Snell's law would need sin θ₂ greater than 1, which is impossible. No light gets out: all of it is reflected back inside. This total internal reflection wastes nothing, so it beats even a silvered mirror. Press “Go to the critical angle” in the lab, then nudge the angle up by half a degree to watch the refracted ray vanish.

Prisms, dispersion and minimum deviation

A prism bends light twice, once at each face, and both turns go toward its thick base. The total turn is the deviation δ = i + e − A, where i is the angle of incidence, e the exit angle and A the apex angle. As you change i, δ first falls and then rises again; the lowest value is the minimum deviation, reached when the ray crosses the prism symmetrically. For a 60° crown glass prism it is about 38.6° for yellow light.

Glass does not have a single refractive index: it is a little higher for violet than for red. This dispersion is why a prism fans white light into a spectrum, with violet bent the most. The lab uses Cauchy's equation, n(λ) = A + B/λ², fitted to typical crown glass, dense flint glass and water. Flint glass disperses about four times as much as crown glass, which is why the puzzle uses it to pick out green light (level 9). Isaac Newton went one step further and used a second, reversed prism to merge the colors back into white (level 11).

How a raindrop makes a rainbow

Sunlight that enters a round raindrop refracts, reflects once off the back of the drop and refracts again on the way out. Depending on where it enters, it comes back at any angle up to a limit of about 42° from the point directly opposite the Sun — and close to that limit many rays pile up together. That concentration is the bright bow. Turn on the bundle view in the raindrop tab to see the rays crowd together at the edge.

Because water bends red slightly less than violet, red's limit is a little larger (about 42.4°) than violet's (about 40.7°), so red sits on the outside of the bow. Light that reflects twice inside the drops forms the fainter secondary rainbow at about 50–53°, with the colors reversed. Between the two bows, almost no light returns, which makes the sky noticeably darker there: Alexander's dark band. And since every rainbow is a cone around the point opposite the Sun, you can never walk to its end.

Refraction in everyday life

A straw in a glass looks broken at the water line, and a pool looks shallower than it is. Light from under the water bends away from the normal as it leaves, and your eye traces it back along a straight line to a point that is too high. Looking straight down, the apparent depth is the real depth divided by 1.33, so a 2 m pool looks about 1.5 m deep — worth remembering before you jump in.

On a hot day the air just above a road can be much hotter than the air a meter higher, and hot air has a slightly lower refractive index. Light from the sky heading down at a shallow angle bends a little more at each warmer layer until it turns back upward, so you see a patch of sky on the road that looks like water. That is an inferior mirage, the subject of puzzle level 7. The same shifting layers make distant objects shimmer over a barbecue or a runway.

How to use the four tabs

About the model

Every ray is traced exactly with Snell's law in two dimensions, so the angles you read are the real ones for the stated refractive indices. Reflected brightness uses the Fresnel equations for unpolarized light. A few simplifications keep the pictures readable: each color is a single thin ray, the prisms and gems are perfect flat-sided shapes, light lost to absorption is ignored, and in the mirage level the difference in the air's refractive index is exaggerated about 250 times so the bend fits on the screen.

Frequently asked questions

What is the critical angle of water, glass and diamond?
Going out into air, the critical angle is about 48.8° for water (n = 1.33), 41.8° for ordinary glass (n = 1.50) and 24.4° for diamond (n = 2.42). It comes from sin θc = n₂ ÷ n₁. Light that hits the surface at more than this angle cannot get out and is totally reflected. The critical angle only exists when light goes from a higher index to a lower one.
Why does a straw look bent in a glass of water?
Light from the part of the straw under water bends away from the normal as it leaves the water. Your brain assumes light travels in straight lines, so it places the underwater part higher than it really is. The straw seems to bend sharply at the surface even though it is perfectly straight. The same effect makes pools and rivers look shallower than they are.
Why is a rainbow always about 42° from the point opposite the Sun?
Light that reflects once inside a spherical water drop can come back at any angle up to about 42°, but not beyond, and many rays bunch up right at that limit. Only drops sitting at that angle from your line of sight send you concentrated light, so the bow is a circle of radius about 42° around the shadow of your head. Red has the largest limit and sits outside; violet, about 40.7°, sits inside.
What is the difference between crown glass and flint glass?
Crown glass (n ≈ 1.52) is the ordinary low-dispersion glass used in windows and most lenses. Flint glass contains heavy elements such as lead or titanium, which raise its refractive index (here about 1.78) and its dispersion, so it spreads colors about four times as widely. Camera and telescope makers glue a crown lens to a flint lens so their color errors cancel; prisms for spectroscopes are often made of flint for a wider spectrum.
Is total internal reflection better than a mirror?
Yes. A good aluminum or silver mirror reflects roughly 90–98% of the light and loses the rest, and its coating can tarnish. Total internal reflection sends back essentially 100%, with no coating at all. That is why binoculars, camera viewfinders and periscopes use glass prisms instead of mirrors, and why light can travel tens of kilometers inside an optical fiber.
Which school topics does this simulator cover?
The refraction lab and the easy quiz match the light and optics unit of middle school science: bending toward or away from the normal, refractive index and total internal reflection. Snell's law calculations, critical angles, prism deviation and the rainbow angle belong to high school physics. The puzzle game is a hands-on way to practice both levels.