What the ascii donut screensaver is
A torus is swept as two angles: one walks around the small circle of the tube, the other rotates that circle around the middle. Every point is turned on two axes, projected onto the character grid, and kept only if it is nearer than whatever was there before. The character is chosen by how the surface faces a fixed light, which is why the shape reads as lit rather than as an outline.
The original is Andy Sloane’s donut.c from 2006, written to be short enough to fit in a shape — a piece of C source code that is itself a donut. What is on screen here is real text in a real page, not a picture of it, so you can select it.
- A terminal-looking screen for a stream, a desk display or a demo
- The obvious background for anything about programming
- Something to leave running on a monitor in a room full of engineers
The spinning donut, full screen in a browser
Resolution sets how many characters wide the grid is. Low values give you the chunky original, about seventy columns across; turn it up and the shading gets fine enough that the donut starts to look genuinely smooth. The character height is worked out from your screen, so it stays round rather than stretching into an oval.
The rotation control goes all the way down to a standstill, which is worth doing once to see how much of the effect is the shading rather than the movement.
How to run the ascii donut screensaver full screen
Press the fullscreen button on the player, or the F key. Escape brings you back to the page. On a desktop browser F11 does the same job and hides the browser’s own toolbars as well, which is what you want on a display that is going to be left running.
Everything you change in the settings is written into the address bar as you change it, so the version you have set up is a link. Bookmark it, or send it to whoever is running the screen. Space pauses and resumes at any time.