The light will either bend around the obstacle or spread out through the gap.
Single slit diffraction
If monochromatic laser light is shone through a single, narrow slit then the diffraction pattern produced is composed of both light and dark fringes: the central fringe is large and bright while those located on either side of this fringe become dimmer the further from it they are.
Diffraction grating
A diffraction grating consists of numerous closely spaced parallel lines in a piece of glass through which light is able to pass.
Transmission diffraction gratings are used in spectrometers to analysis with light transmitted from stars. The light is split up into a spectra by the gaps.
dsin? = n?
In which:
d = grating spacing in metres (m)
? = angle of diffraction
n = order number
? = wavelength of the light in metres (m)
It is possible to rearrange the equation:
? = dsin? / n
It is also possible to calculate the grating spacing (d) as follows:
d=1/N