Diffraction is the bending and spreading of waves when they encounter obstacles or pass through narrow openings, a phenomenon exploited analytically when X-rays diffract from crystal lattices to reveal atomic structure. X-ray diffraction patterns are used to analyse the structure of crystals, including food proteins, carbohydrates and starches, and to identify cocoa butter polymorphs. The technique links molecular packing to texture and stability, helping chocolatiers achieve the snap and gloss of well-tempered chocolate. Crystallographers also apply it to starches and proteins, where the patterns reveal how processing alters molecular order.