a grating is a series of parallel lines having a spacing comparable with the wavelength of light. Such an array of lines has the ability to split white light into a rainbow because the different wavelengths are bent, or diffracted, by different amounts. Such gratings were originally produced by using a diamond to rule closely spaced lines onto glass, but they are now more often produced by optical interference.