🔷 Crystal Lattice & Unit Cell 3D

Build simple cubic, BCC, FCC, diamond, rock-salt, CsCl and HCP crystals in 3D, slice them with any Miller plane (hkl), and calculate theoretical density, packing fraction, coordination number, d-spacing and the X-ray Bragg angle for real materials.

drag to orbit · scroll / pinch to zoom · double-click resets
Atoms per cell
Coordination number
Packing fraction
Theoretical density
Cell volume
Nearest-neighbour distance
d-spacing d(hkl)
Bragg angle 2θ (n = 1)
Atomic radius (hard sphere)
First allowed XRD peaks (2θ)

How this works — lattices, packing and X-ray diffraction

A crystal is a unit cell repeated in every direction. Atoms on corners are shared by 8 cells, on edges by 4 and on faces by 2 — so simple cubic holds 1 atom per cell, BCC 2, FCC 4 and diamond 8.

Hexagonal close packing uses a and c = 1.633 a (ideal); its d-spacing and selection rule are not cubic, so the Miller and Bragg fields apply to the cubic structures only.