Afterglowscreensavers

The Terminator Screensaver

The Terminator screensaver draws the real boundary between day and night on Earth, computed from the solar declination and hour angle for the current date. It runs in the browser with nothing to install; press ESC to exit.

Live preview

The Terminator screensaver — The tilt is why it leans.

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

How the The Terminator 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 sun's position is computed in the browser from the date.

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.

The day-night line and the tilt of the Earth

The terminator is the line separating the sunlit half of a planet from the dark half. On Earth it is a great circle, always ninety degrees from the point directly beneath the Sun. Seen on a flat map, though, a great circle that is not aligned with the equator appears as a sinuous curve, which is why the familiar day-night map has an S shape rather than a straight vertical line.

Two quantities fix where it falls. The solar declination, the latitude at which the Sun is directly overhead, shifts between roughly 23.4 degrees north and south over the year because the Earth's axis is tilted. The hour angle sets the longitude at which the Sun is overhead, and it moves westward as the Earth turns. Close to the solstices the line leans strongly, and at the equinoxes it runs almost pole to pole.

The line itself is not sharp in reality. Light fades through civil twilight (Sun's centre up to 6 degrees below the horizon), nautical twilight (6 to 12 degrees) and astronomical twilight (12 to 18 degrees). A computed line marks the geometry of the Sun's centre, so the actual change in light is spread over a zone on either side.

A worked example

The sphere is shaded in a fragment shader by its own surface normal against the sun direction, so the terminator is exact rather than a drawn arc. It is deliberately soft: civil twilight extends about six degrees past the geometric line, so a real terminator is a band. Because the Earth's axis is tilted 23.44°, the line leans with the seasons, and near a solstice an entire polar cap sits in permanent light or permanent dark.

Settings & tips

Frequently asked questions

Why is the boundary not a straight line?
Because the axis is tilted. If the Earth stood upright the terminator would run pole to pole through every meridian in turn. The 23.44° tilt swings it, which is what creates seasons and, at the extremes, midnight sun and polar night.
Are the city lights real?
No. The dark side is scattered with lights weighted toward the mid latitudes, where most people live, but they are generated rather than taken from a night-lights satellite image. The terminator itself is computed properly.
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.
Why does the terminator curve on a flat map?
A great circle that is tilted with respect to the equator is projected as a curve on a rectangular map, even though on the globe it is a perfectly round circle.
What is twilight?
It is the period when the Sun is below the horizon but still lights the sky. It is divided into civil, nautical and astronomical stages: up to 6, 6 to 12, and 12 to 18 degrees of the Sun's centre below the horizon.
Is the line at the equinox straight?
At the equinoxes the Sun is above the equator, so the terminator passes through both poles and looks nearly straight on a map.

← All Earth & Ocean screensavers