Turn the crystal.
Find the peak.
X-rays scatter from atoms. In a crystal, the scattered waves can reinforce one another in some directions and cancel in others. Rotate the crystal and watch when a bright diffraction spot appears on the detector.
Drag the 3D scene to change your view. Use the slider to rotate the crystal itself.
The normalized value is 1 at the model's ideal Bragg condition. It is not a measured photon count.
What changes when you turn it?
The detector image and rocking curve use the same finite-lattice model. The strongest spot appears when the rotated crystal meets the diffraction condition.
What is actually calculated?
The crystal contains 9 × 7 × 7 identical point scatterers on a simple-cubic lattice. For each detector direction, the program sums their scattered complex amplitudes and squares the magnitude. For this regular lattice, the sum becomes a product of three finite-lattice interference factors.
The first-order Bragg angle obeys 2d sin θ = λ. This is a kinematic, single-scattering demonstration. It does not model multiple scattering, dynamical diffraction, absorption, strain, detector resolution, or photon noise. No experimental dataset is reproduced here.