Thus, in the above example the refraction is away from the perpendicular because air is less dense than water. Such effects form the basis of the refracting telescope, and of optical devices using lenses in general. This is called diffraction , and is illustrated in the adjacent image. The intensity of light behind the barrier is not zero in the shadow region. Here is a Java applet illustrating diffraction of light by a single slit, and here is an interactive demonstration of refraction and diffraction for ocean waves .
Diffraction has a number of consequences for astronomy.
Two of the more important are that this property is the basis for the diffraction grating that can be used to separate light into its constituent colors, and that diffractive effects set an absolute limit on the quality of an image observed through an optical instrument such as a telescope. This diffractive limit occurs because the lenses of such objects are of finite size and diffract light because they cut off part of the light wave.