Answer
A crystal acts as a three-dimensional grating for x-rays but not for visible light because the wavelength of x-rays is much shorter than the wavelength of visible light.
Work Step by Step
The diffraction of x-rays by a crystal is a result of the periodic arrangement of atoms within the crystal lattice. The spacing between the atoms in the crystal lattice is on the order of a few angstroms, which is similar to the wavelength of x-rays (typically around 1-10 angstroms). When x-rays encounter a crystal, they interact with the atoms in the lattice and diffract at specific angles, creating a diffraction pattern.
On the other hand, the wavelength of visible light is on the order of 400-700 nm, which is much larger than the spacing between atoms in a crystal lattice. When visible light encounters a crystal, it does not interact with the atoms in the same way as x-rays, and does not diffract to the same degree. Therefore, a crystal does not act as a three-dimensional grating for visible light, the diffraction pattern is not as noticeable as x-rays.
In summary, the reason a crystal acts as a three-dimensional grating for x-rays but not for visible light is because the wavelength of x-rays is much shorter than the wavelength of visible light, making it possible for x-rays to interact with the atoms in a crystal lattice and diffract at specific angles, while visible light does not.