A diffractometer produces electromagnetic radiation (waves) with known wavelength and frequency, which is determined by their source. The source is often x-rays, because they are the only kind of energy with the optimal wavelength for inter-atomic-scale diffraction. However, electrons and neutrons are also common sources, with their frequency determined by their de Broglie wavelength. When these waves reach the sample, the incoming beam is either reflected off the surface, or can enter the lattice and be diffracted by the atoms present in the sample. If the atoms are arranged symmetrically with a separation distance d, these waves will interfere constructively only where the path-length difference 2dsinθ is equal to an integer multiple of the wavelength, producing a diffraction maximum in accordance with Bragg's law. These waves interfere destructively at points between the intersections where the waves are out of phase, and do not lead to bright spots in the diffraction pattern. Because the sample itself is acting as the diffraction grating, this spacing is the spacing.