Afterglowscreensavers

Spiral Galaxy Screensaver

The Spiral Galaxy screensaver places a hundred thousand stars on elliptical orbits and lets spiral arms emerge from the orbits themselves rather than drawing any spiral. It runs in the browser with nothing to install; press ESC to exit.

Live preview

Spiral Galaxy screensaver — Arms nobody drew.

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

How the Spiral Galaxy 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 nothing external — the orbits are generated in the browser.

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.

Density waves and why spiral arms last

Spiral galaxies pose an old puzzle, the winding problem. Inner matter orbits faster than outer matter, so arms made of the same stars would wind ever more tightly and become indistinguishable from the rest of the galaxy after only a few orbits. Real arms last far longer, so they cannot be fixed lines of stars carried around.

The standard answer is density wave theory, proposed in the mid-1960s by C. C. Lin and Frank Shu, with a key paper in 1964. In it the arms are regions of higher density that move through the disk, rather than fixed collections of matter. Stars and gas pass through the pattern, much as cars pass through a traffic jam that persists while its members change.

A related feature to notice is that orbits are elliptical, and if each ellipse is rotated slightly relative to its neighbour, the crowding of the paths forms a spiral pattern without any spiral being drawn explicitly. This is a stylised picture: real galaxies also contain dark matter, gas physics and other structure, and the visible detail is far more complicated than a set of nested ellipses.

A worked example

Each star follows an ellipse, and the orientation of that ellipse advances steadily with distance from the centre. Where neighbouring orbits crowd together, stars pile up — and that crowding traces the arms. It is density wave theory in its simplest form, and it answers a problem that troubled astronomers for decades: if arms were physical structures they would wind up tight within a few rotations, yet galaxies are billions of years old.

Settings & tips

Frequently asked questions

So the arms are not made of fixed stars?
Correct, and that is the point. Stars drift in and out of an arm the way cars pass through a traffic jam. The pattern persists; the members of it do not.
Is this a physical simulation?
Not a gravitational one — there is no force calculation between stars. It is a kinematic model that reproduces the mechanism behind spiral structure without the cost of an n-body simulation.
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.
What is the winding problem?
If arms were fixed groups of stars, the faster orbits near the centre would wind them tighter and tighter, and they would blur into the rest of the galaxy after a few orbits. Density wave theory avoids this by treating arms as a pattern moving through the disk.
Who proposed density wave theory?
C. C. Lin and Frank Shu, in the mid-1960s, with a key paper in 1964.
Does the saver draw a spiral?
No. The stars follow elliptical orbits, and the arms emerge from how the orbits are arranged, not from a drawn spiral.

← All Space & Astronomy screensavers