Caption: Light refraction with prism. Computer illustration showing beams of light being refracted as they pass through a prism. Refraction is the change in direction of propagation of a wave (in this case light) that occurs when the wave passes from one medium to another with a different density. As light passes through the prism it slows down and is refracted (bent) due to the greater density of the prism material. The amount of bending depends on the angle of incidence and the refractive index of the material. As the refractive index varies according to the wavelength of the light, light of different colours is refracted more or less depending on their different wavelengths. This causes the light to be split (dispersion) as it exits the prism, producing the characteristic rainbow effect.