First we will look at Bragg diffraction and how this leads to the Ewald sphere.
The top panel on the left shows a crystal in an X-ray diffraction experiment. The X-ray beam comes from the left, and is diffracted by the crystal. Diffraction spots will form on the screen on the right. The crystal cell parameters are a=3 Å, b=4 Å and c=5 Å, and the X-ray beam has a wavelength of 1.5 Å. The slider above the crystal and the buttons below allow the crystal to be rotated to vary the angle θ between the incident beam and the (0,1,0) Bragg planes. Try rotating the crystal now.
The bottom panel on the right shows the crystal lattice and the X-ray waves diffracted from atoms at two lattice points, lying on the (0,1,0) Bragg planes. These Bragg planes are initially horizontal, and can be seen as rows of 5 atoms. As you rotate the crystal, the diffracted beam moves so that the angle of inciindence is equal to the angle of diffraction, and so the diffracted beam is at an angle of 2θ to the incident beam.
The diffraction vector S, which is the difference between the diffracted beam vector and the straight through beam vector, is shown as a blue arrow, which grows as you rotate the crystal. Note that this vector is always perpendicular to the Bragg planes. As the crystal is rotated, the tip of the diffraction vector traces out a circle around the crystal. If we were to rotate the crystal around another axis, the diffraction vector would trace out the surface of a sphere, which we call the Ewald sphere.
If you rotate the crystal slowly, you will see that the two diffracted beams gradually go out of phase and then come back into phase again, when θ is about 11°. This is a direction of constructive interference, where this set of Bragg planes will lead to a diffraction spot. Constructive interference occurs because the path difference between the two beams is equal to one whole wavelength, bringing the beams back into phase. A small blue marker is placed on the Ewald sphere at this point.
If you rotate the crystal further in the same direction, you can find two more angles at which the beams are in phase. These correspond to path differences of 2 and 3 wavelengths. They also correspond to a path difference of 1 wavelength for the more closely spaced (0,2,0) and (0,3,0) Bragg planes. The length of the diffraction vector is inversely proportional to the spacing of these planes. The length of the vector is also proportional to 2sin(θ). (The position of the spots on the detector is related to tan(2θ) however, which is why the lines of spots are slightly curved.)