How to Build a Laser Death Ray
In the section on diffraction, it was discussed how a barrier makes light waves bend around it. If you set up a regularly spaced array of identical barriers, the light that hits the barriers can only get bent in certain directions. This is used to make diffraction gratings.
A traditional diffraction grating is a series of closely spaced streaks or marks on a reflective or transparent surface, spaced about a wavelength's distance apart. Light that hits the grating diffracts in a direction perpendicular to the marks. The angle which the light scatters at depends on its wavelength and the spacing between the marks. White light is spread out into a rainbow fan
If the incident beam has only one wavelength, the scattered beams will emerge at very specific angles.
Since the direction at which the diffracted light emerges depends on the orientation of the grating, you can use curved gratings to focus light in the same way a curved mirror can focus light with reflection and a curved interface can focus light with refraction (see also zone plates for a way of focusing light using diffraction with a flat surface rather than a curved surface). Since the amount of deflection depends on the wavelength, a diffraction grating focusing element will only focus one wavelength well.
For x-rays, it conveniently turns out that atoms in a crystal are all evenly spaced with a spacing of about an x-ray wavelength. Thus, a crystal makes a three-dimensional diffraction grating for x-rays. The diffracted x-rays can be focused by straining the crystal.