Skip to content

Light and optics simulation

Refraction and Snell's Law Simulation

Shine a ray of light into glass, water or diamond and watch it bend. Measure the angles with the protractor, check Snell's law, and find the critical angle where total internal reflection begins.

Loading simulation…
Show symbols for

Predict first

Question 1 of 4

A ray of light goes from air into glass at an angle of incidence of 40°. Which way does it bend?

Try this

  1. 1Set air → glass. Increase the angle of incidence from 0° to 80°. Does the refracted ray ever bend away from the normal?
  2. 2Press the swap button so the light goes from glass into air. Slowly raise the angle until the refracted ray disappears. Write down the critical angle.
  3. 3Watch the reflected ray as you change the angle. When is it faint, and when is it bright?
  4. 4Compare the critical angles for water, glass and diamond. Which material traps light most easily?
  5. 5For any angle, check that the two sides of the Snell check readout are equal.

What this simulation shows

A ray box shines a narrow beam of light at the boundary between two materials. You choose the materials, and you set the angle by dragging the ray box or using the slider. The simulation draws the incident ray, the reflected ray and the refracted ray, measures the angles from the normal, and works out what happens using Snell's law.

Why light bends

Light travels at different speeds in different materials. It is fastest in a vacuum and almost as fast in air. In water it is about a quarter slower, and in glass about a third slower. The refractive index nn tells you how much slower:

n=cvn = \frac{c}{v}

When a ray meets a boundary at an angle, the change of speed makes it change direction. Light that slows down bends towards the normal. Light that speeds up bends away from it. A ray that arrives along the normal changes speed but not direction. Try 0° to see this.

Snell's law

Snell's law connects the angles on the two sides of the boundary:

n1sin⁡θ1=n2sin⁡θ2n_1 \sin \theta_1 = n_2 \sin \theta_2

When light enters a material from air, this becomes n=sin⁡isin⁡rn = \dfrac{\sin i}{\sin r}, where ii is the angle of incidence and rr is the angle of refraction. The Snell check readout works out both sides for you. Whatever angle you choose, the two numbers match.

The critical angle and total internal reflection

Now make the light go from glass into air. The refracted ray bends away from the normal, so it gets closer and closer to the surface as you raise the angle. At one angle it runs along the surface. This angle of incidence is the critical angle, cc:

sin⁡c=1n\sin c = \frac{1}{n}

Raise the angle any further and there is no refracted ray at all. All the light reflects back inside the glass. This is total internal reflection, and it is how optical fibres carry internet data and how endoscopes let doctors see inside the body.

Total internal reflection only happens when light is heading into a material with a lower refractive index. Going from air into glass, you will never see it, however large the angle.

Watch the reflected ray

Some light is always reflected at a boundary, even when most of it passes through. The simulation makes the reflected ray brighter or fainter to match how much light goes each way. At small angles only a few per cent is reflected. Near the critical angle, and at grazing angles, the reflection gets much stronger.

Symbols in your course

Some courses write the angles as ii and rr, others as θ1\theta_1 and θ2\theta_2. Some only ask you to describe refraction rather than calculate it. The physics shown here is the same for every syllabus.

Equations

  • Refractive index (Snell's law)

    n=sin isin r

    refractive index = sin(angle of incidence) ÷ sin(angle of refraction)

    Open calculator →
  • Critical angle

    n=1sin c

    refractive index = 1 ÷ sin(critical angle)

    Open calculator →
  • Refractive index and the speed of light

    n=cv

    refractive index = speed of light in a vacuum ÷ speed of light in the material

    Open calculator →

Check your understanding

8 questions

  1. 1.Why does light bend when it goes from air into glass at an angle?
  2. 2.Light goes from air into water. Compared with the angle of incidence, the angle of refraction is…
  3. 3.From where are the angles of incidence and refraction measured?
  4. 4.A glass has a refractive index of 1.5. What is the speed of light in it? (c = 3.0 × 10⁸ m/s)
  5. 5.Total internal reflection can only happen when light…
  6. 6.What is the critical angle for glass with a refractive index of 1.5?
  7. 7.Light passes from air into glass at an angle of incidence of 30°. The glass has n = 1.5. What is the angle of refraction?
  8. 8.Optical fibres carry light along a bent glass core. Which effect keeps the light inside?

For teachers

Embed it in your site or open it full-screen for the projector.

Read more