This applet shows you how light is refracted when it travels from one medium to another medium of a different refractive index.

If the applet does not appear, please try the following:
(1) Download the Java software from
(2) Go to the menu: Tools > Turn off Pop-Up Blocker.
(3) Tools > Internet Options > Advanced > Security > Allow Active Contents.
(4) Start Menu > All Programs > Java > Configure Java > Security and then add this website to the Exception Site List.

Snell's Law: ni sin θi = nr sin θr
where ni = refractive index of the first medium,
θi = angle of incidence,
nr = refractive index of the second medium,
θr = angle of refraction.

When light travels from one medium to another medium of lower refractive index
and the angle of incidence is greater than a certain critical angle, total internal reflection occurs.

Refractive Indices of Common Materials:
Vacuum: 1
Air: 1.0003
Water: 1.33
Glycerine: 1.47
Glass: 1.52
Emerald: 1.58
Ruby: 1.76
Sapphire: 1.77
Diamond: 2.42

Right-click here to download this page and the Java Class File.