Home▸Rendering & Computer Graphics▸2D Crystal Lattice: Bravais Grids, Packing & Lennard-Jones Energy

2D Crystal Lattice: Bravais Grids, Packing & Lennard-Jones Energy

Switch between square, triangular and honeycomb Bravais lattices built from real primitive vectors, tune spacing, thermal vibration amplitude and vacancy-defect rate, and watch coordination number, packing fraction and Lennard-Jones bond energy update live as bonds stretch and compress.

Rendering & Computer Graphics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-crystal-3d-lattice ↗ Open standalone

This 2D companion builds real crystallography instead of the 3D version's decorative gem scene: pick square, triangular or honeycomb, and the engine constructs the lattice from genuine primitive (Bravais) vectors plus a basis — a two-atom basis on a triangular net for honeycomb, matching how graphene's structure is actually derived — then finds nearest-neighbour bonds geometrically rather than hard-coding them. Raising temperature adds a √T-scaled sinusoidal jitter to every atom, visibly straining bonds away from their equilibrium length; a Lennard-Jones potential (minimum pinned at the lattice constant) turns that live bond length into a running energy total, while a vacancy-defect slider removes atoms at random and the coordination-number and packing-fraction readouts recompute against what's actually left on screen, not the ideal defect-free structure.

⚙ Under the hood

2D crystal-lattice lab: switch between square, triangular and honeycomb Bravais lattices, tune spacing, thermal vibration and vacancy defects, and read live coordination number, packing fraction and Lennard-Jones bond energy.

crystal latticebravais latticepacking fractionlennard-jones potentialcoordination numberpoint defects

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

Why does honeycomb need two atoms per cell instead of one?

A single Bravais lattice point can't reproduce honeycomb's alternating up/down hexagon pattern on its own — you need a triangular Bravais net plus a two-atom basis (like graphene's A and B sublattices) so every atom still ends up with exactly 3 nearest neighbours at the same bond length.

Why does the packing fraction differ between lattice types?

Packing fraction is the fraction of the plane covered by touching circles centred on every site. Triangular packs tightest (φ ≈ 0.9069, the 2D close-packing maximum), square is looser (φ ≈ 0.7854), and honeycomb is sparsest (φ ≈ 0.6046) because each site has only 3 neighbours instead of 6 or 4.

What does the Lennard-Jones energy readout represent?

Each bond's energy follows U(r) = 4ε[(σ/r)¹² − (σ/r)⁶], with σ chosen so the minimum sits exactly at the lattice constant. At T = 0 bonds sit at equilibrium and the total is near its most negative; raising temperature stretches and compresses bonds away from that minimum, pushing the summed energy up.

What did you find?

Add reproduction steps (optional)