This simulation covers refraction and total internal reflection. Two media are shown, with the interface between them being horizontal. In general (but not always!), when a ray of light traveling in the top medium strikes the interface, part of the light is reflected back into the top medium and the rest is refracted into the second medium. Adjust the index of refraction of the two media, and the angle of incidence, and notice what happens to the refracted and reflected rays.

Here are some things to investigate:
 1 The angles are measured from the normal. What direction is the normal relative to the interface between medium 1 and medium 2?
 2 In general, when light passes from one medium to a second medium that has a higher index of refraction ( n2 > n1 ), does the light bend towards the normal or away from the normal? What happens when the second medium has a lower index of refraction than the first ( n2 < n1 )?
 3 There is one particular angle of incidence that always results in the same angle of refraction, no matter what the indices of refraction are. What is this angle?
 4 Set n1 > n2 . The critical angle will be displayed. If the angle of incidence is less than the critical angle, some of the light refracts into the second medium. When the angle of incidence exceeds the critical angle, however, what happens? This is known as total internal reflection.