When X rays strike a crystal, strong diffracted beams appear only at particular angles. In ①, see how 2d sinθ = λ is related to the interplanar spacing dhkl; in ②, check the reciprocal lattice and the Ewald sphere, and in ③, the structure factor and systematic absences. In ④, see that even if you fix the lattice constant and swap only the contents, the Bravais lattice determines the peak positions; ⑤ and ⑥ deal with the powder XRD patterns of real crystals and the Scherrer equation.
Mochizuki Research Group, Tokyo University of Science | The powder patterns are computed on the spot by this page’s JavaScript, and have been confirmed to agree with the pymatgen output. The approximations, data sources and derivations of the equations are given on the explanation page (in Japanese), Appendix A.