The
directions in which X-rays are scattered depends on
several factors, expressed in Bragg's Law. Try varying
the wavlength of the rays, the angle at which they hit
the surface, and the spacing of atoms within the crystal,
to see how they affect the phase of the reflected rays.