This animation shows the refraction of a beam of light passing from air to a transparent material of higher refractive index.
You can drag the incident ray to change the angle of incidence.
Use the slider to vary the refractive index of the transparent material. There are five options: 1.0 (air), 1.33 (water), 1.5 (glass), 1.77 (saphire) and 2.42 (diamond).