# Grating spectra

Grating is optical device used to learn the different wavelengths or colors contained in a beam of light. The device usually consists of thousands of narrow, closely spaced parallel slits (or grooves). Because of interference the intensity of the light getting pass through the slits depends upon the direction of the light propagation. a diffraction grating is an optical component with a periodic structure, which splits and diffracts light into several beams travelling in different directions. The emerging coloration is a form of structural coloration. The principles of diffraction gratings were discovered by James Gregory, about a year after Newton's prism experiments, initially with items such as bird feathers.It can create "rainbow" colors when illuminated by a wide spectrum light source. The sparkling effects from the closely spaced narrow tracks on optical storage disks such as CD's or DVDs are an example, while the similar rainbow effects caused by thin layers of oil (or gasoline, etc.) on water are not caused by a grating, but rather by interference effects in reflections from the closely spaced transmissive layers.

Gratings may be of the 'reflective' or 'transmissive' type, analogous to a mirror or lens respectively. A grating has a 'zero-order mode' (where m = 0), in which there is no diffraction and a ray of light behaves according to the laws of reflection and refraction the same as with a mirror or lens respectively.

when light is normally incident on the grating, the diffracted light will have maxima at angles θ_{m} given by:

It is straightforward to show that if a plane wave is incident at any arbitrary angle θ_{i}, the grating equation becomes.

dsinθ_{m} = mλ

It is straightforward to show that if a plane wave is incident at any arbitrary angle θi, the grating equation becomes.

d(sinθ_{i} + sin θ_{m})

When solved for the diffracted angle maxima, the equation is

θ_{m} = arcsin(^{mλ}/_{d} - sinθ_{i})

The light that corresponds to direct transmission is called the zero order, and is denoted m = 0. The other maxima occur at angles which are represented by non-zero integers m. Note that m can be positive or negative, resulting in diffracted orders on both sides of the zero order beam.