The Optical Principles of the Diffraction of X-rays