Mirages are associated with deserts. Travellers in deserts often see lakes ahead of them, but they are never able to reach them because they are optical illusions. In fact mirages can occur in many places. On a hot summer day the surface of a hot road in the distance may appear wet, as if after rain.
Light from the sky is progressively bent as it passes through layers of less optically dense air of increasing temperature – or decreasing refractive index – until it meets a layer at an angles equal to the critical ange, whence it undergoes total internal reflection.
A rainbow is an arc of concentric coloured bands that spans a section of the sky. For a rainbow to form, rain must be falling in one part of the sky and the sun must be shining from behind the observer. Rainbows form when sunlight enters a raindrop and the various wavelengths of visible light, representing the different colours, begin to slow and bend. Violet light bends the most and red light bends the least. Most of the light passes through the raindrop but the refracted light that hits the back of the drop at a certain angle (called the critical angle) is reflected off the back of the drop.
The light is then refracted a second time as it emerges from the drop. Because each colour bends differently, each colour emerges from the drop at a slightly different angle, producing a spectrum of colours. Because only a single colour from each drop reaches an observer, it takes many raindrops, each one reflecting light back to an observer at slightly different angles, to produce the colours of a primary rainbow.