Skip to main content

Light & Refraction

Explore the law of reflection, Snell's law and total internal reflection interactively — adjust refractive indices and incidence angle and see the real reflected and refracted ray angles recompute live.

How it works

When light reaches the boundary between two transparent materials, some is reflected and some passes through and changes direction (refraction). How much it bends depends on the two refractive indices. Going into a material with a lower refractive index at an angle of incidence greater than the critical angle, none gets through: total internal reflection.

What you will learn

After using this simulation you should be able to:

  • State the law of reflection: the angle of reflection equals the angle of incidence.
  • Use Snell's law to predict how much light bends when it enters a new material.
  • Explain total internal reflection and the critical angle.

Equations

θᵣ = θᵢ
Law of reflection: the reflected ray leaves at the same angle it arrived.
n₁·sin θ₁ = n₂·sin θ₂
Snell's law: how much the ray bends crossing the boundary.
sin θc = n₂ / n₁
Critical angle, which exists only when n₁ > n₂.
n = c / v
Refractive index: how many times slower light travels in the material than in a vacuum.

What the model assumes

  • Angles are measured from the normal, the line at right angles to the boundary.
  • The boundary is perfectly flat and both materials are clear and uniform.
  • Each material has a single refractive index (the value for yellow sodium light, 589 nm).

Where it stops being right

  • Real refractive indices change slightly with colour (dispersion), which is how a prism splits white light; this model uses one colour.
  • The model gives directions only. It does not say how bright the reflected and refracted rays are; in reality some light is always reflected, more so at grazing angles.

Sources

Loading the Light & Refraction explorer…

Using this simulation

How to use it

  1. Start with a preset to see a real example, then change one control at a time and watch which results change.
  2. Drag a slider to explore, or type an exact number in the box next to it.
  3. The results under the picture update straight away. Open “Show the data as a table” to see them laid out side by side.
  4. When you find something interesting, use “Copy shareable link” to send exactly those settings to someone else.

Things to try

  • Choose “Air into water” at 30°. The ray bends towards the normal, to about 22°.
  • Choose “Glass into air, below the critical angle” and slowly raise the angle of incidence. Beyond about 41° no light gets out: total internal reflection.
  • Set both refractive indices to the same value. The light goes straight on without bending.

The controls

Refractive index of the first medium
How much the material the light starts in slows it down (1 for a vacuum, about 1.33 for water).
Refractive index of the second medium
The same for the material the light is going into.
Angle of incidence
The angle between the incoming ray and the normal (the dashed line at right angles to the surface), in degrees.
Pause animation
Stops and restarts the moving dot that shows the direction of travel.
Preset
Loads a ready-made, real-world example. The sentence under it says what the example shows.
Reset to default
Puts every control back to the first preset.
Exact value boxes
Each slider has a box for typing a precise number. A value outside the allowed range is refused with a message, never quietly changed.
Show the data as a table
Opens the same results as a table.
Copy shareable link
Copies a link that opens the simulation with exactly these settings. The link holds only the settings, nothing about you.

The readings

Angle of reflection
The angle of the reflected ray from the normal.
Angle of refraction
The angle of the ray that goes into the second material.
Critical angle
The angle of incidence above which no light gets through; it only exists going into a material with a lower refractive index.
Total internal reflection
Whether all of the light is reflected back.

Accessibility

  • Colours tell the rays apart (yellow incoming, blue reflected, pink refracted), and every angle is also given in the readings.
  • Every slider works with the keyboard: arrow keys for small steps, Page Up and Page Down for big ones, Home and End for the limits.
  • Every result is written out as text and announced by screen readers as it changes, and the data table holds the same numbers.
  • If your device asks for reduced motion, a still diagram is shown instead of the animation; otherwise the animation can be paused at any time.