Afterglowscreensavers

Crystal Lattices Screensaver

The Crystal Lattices screensaver builds real crystal structures from their published unit cells — sodium chloride, diamond, caesium chloride and graphite — and rotates each in turn. It runs in the browser with nothing to install; press ESC to exit.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Crystal Lattices screensaver works

The saver renders with three.js on your GPU. The library is vendored into this site rather than fetched from a CDN, and loads only when a 3D screensaver actually runs.

It reads measured lattice parameters from the crystallographic literature, held in the saver because the Crystallography Open Database sends no CORS headers.

The scene resizes with the window and releases its WebGL context when the saver stops, so shuffle mode and Multi-view can cycle 3D savers without exhausting the browser's context limit.

If WebGL is unavailable the saver says so on screen rather than showing an empty black box.

A worked example

Each structure is the actual arrangement rather than a decorative lattice. Sodium chloride alternates two ion types on a cubic grid. Diamond puts every carbon at the centre of a tetrahedron of four others, which is why it is so hard. Graphite is the same element in stacked hexagonal sheets held together by almost nothing, which is why a pencil leaves a mark. Bonds are drawn between near neighbours so the network reads as a network.

Settings & tips

Frequently asked questions

Why are diamond and graphite so different?
Because they are the same atoms arranged differently. Diamond's every-carbon-bonded-four-ways network is rigid in all directions; graphite's sheets are strong internally but barely attached to each other, so they slide. The structure, not the composition, is the property.
Are the proportions right?
The relative bond lengths follow the real lattice constants, so the geometry is faithful. Atomic radii are drawn larger than scale so the structure is legible — at true scale the atoms in an ionic crystal nearly touch.
Does this need a special browser or plugin?
No. It uses WebGL, which every current desktop and mobile browser supports. Nothing is installed and no plugin is required.
Does it cost anything or need an account?
No. Every screensaver here is free, runs in the browser and needs no sign-up.

← All Science & Research screensavers