An apparatus includes a planar waveguide, first and second gratings for
coupling electromagnetic radiation into the planar waveguide, and a beam
shaper for controlling the amplitude distribution of the electromagnetic
radiation that impinges on the first and second gratings. A method of
coupling electromagnetic radiation into a planar waveguide is also
provided.