Thus, when the light rays emitted by the stars travels through the atmosphere, they undergo refraction, i.e., they are bent. The degree of refraction depends on the density of the atmosphere. Owing to several layers of different densities, the rays of light emitted are randomly refracted several times, in random directions. This leads to the effect of "twinkling", which is merely an interpretation of refracted light by our eyes.