The diffraction grating

What you can do here
Set the device so that the sun shines on the window in its narrower part. The diffraction grating is there. Look at the image on the focusing screen. What you can see is the sunlight spectrum. Note that the colours are in reverse order compared to the prism. Red is most shifted away from the direction of light falling on the grating, while violet is least shifted.

How it works
The diffraction grating is a slide with a large number of parallel, closely spaced slits (transparent spaces) drawn on it, up to 1000 parallel slits per millimetre. In this experiment, the sunlight exhibits the wave nature going through the slits, it bends and propagates as semicircles. This a phenomenon is called diffraction (bending) and takes place at every slit of the grating. The waves that propagate behind the slits overlap and amplify at specific points (different for light of different length, therefore the different colour), which we call wave interference. As a result of diffraction and interference you get the sunlight spectrum with colours in the opposite order then in the prism.

Interesting facts
Diffraction gratings are used to make spectrometers, instruments which break up the light into its basic colours. Such an analysis of light emitted by various substances (spectral analysis) allows for determine what elements a light source is made up of. Using spectral analysis, scientists can determine the chemical composition of even very distant stars.
Similarly, you can see the rainbow on a compact disk when the light is reflected from its surface. A CD is a reflective diffraction grating.