🔷 Crystal Lattice & Unit Cell 3D
🔷 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.
- Density:
ρ = Z · M / (N_A · V_cell), where Z is formula units per cell, M the molar mass and N_A = 6.02214076×10²³ mol⁻¹. Copper (FCC, a = 361.49 pm, M = 63.546) gives 8.93 g/cm³ — the measured value is 8.96. - Packing fraction: volume of touching hard spheres ÷ cell volume — SC 52.4 %, BCC 68.0 %, FCC and ideal HCP 74.0 % (the densest possible, Kepler's conjecture), diamond 34.0 %.
- Miller plane (hkl): the plane cutting the axes at a/h, a/k, a/l. For cubic cells the spacing between parallel planes is
d = a / √(h² + k² + l²). - Bragg's law:
n λ = 2 d sin θ. The default λ is Cu Kα₁ (154.06 pm), the most common lab X-ray source. Not every plane reflects: FCC needs h, k, l all odd or all even; BCC needs h + k + l even; diamond also forbids all-even sums that are not multiples of 4 — the tool checks these selection rules for you.
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.