klein(6x)
π klein(6x) β XScreenSaver manual π
okay bestie, listen up. this is klein, from the XScreenSaver manual, and it is literally about drawing a 4d Klein bottle. no cap. it shows three different Klein bottles in 4d, and you can walk on them, watch them turn in 4d, or walk while they turn. main character energy, fr fr. π¦
β¨ NAME β¨
klein β draws a 4d Klein bottle. π
π SYNOPSIS π
klein [--display host:display.screen] [--install] [--visual visual]
[--window] [--root] [--window-id number] [--delay usecs] [--fps]
[--klein-bottle bottle-name] [-figure-8] [-pinched-torus] [-lawson]
[--mode display-mode] [--wireframe] [--surface] [--transparent]
[--appearance appearance] [--solid] [--bands] [--colors color-scheme]
[--onesided] [--twosided] [--rainbow] [--depth] [--change-colors]
[--view-mode view-mode] [--walk] [--turn] [--walk-turn] [--orientation-
marks] [--projection-3d mode] [--perspective-3d] [--orthographic-3d]
[--projection-4d mode] [--perspective-4d] [--orthographic-4d] [--speed-
wx float] [--speed-wy float] [--speed-wz float] [--speed-xy float]
[--speed-xz float] [--speed-yz float] [--walk-direction float] [--walk-
speed float]
π DESCRIPTION π
okay so klein shows three different Klein bottles in 4d: the figure-8 Klein bottle, the pinched torus Klein bottle, or the Lawson Klein bottle. (yes, βorβ β you pick one, bestie.) You can walk on the Klein bottle, see it turn in 4d, or walk on it while it turns in 4d. iconic. β¨
The figure-8 Klein bottle is well known in its 3d form. The 4d form used in this program is an extension of the 3d form to 4d that does not intersect itself in 4d β and you can see that in the depth colors mode when using static colors. The pinched torus Klein bottle also does not intersect itself in 4d β again, you can see that in the depth colors mode when using static colors. The Lawson Klein bottle, on the other hand, does intersect itself in 4d. Its primary use is that it has a nice appearance for walking and for turning in 3d. periodt.
The Klein bottle is a non-orientable surface. To make this apparent, the two-sided color mode can be used. Alternatively, orientation markers (curling arrows) can be drawn as a texture map on the surface of the Klein bottle. While walking on the Klein bottle, you will notice that the orientation of the curling arrows changes β which it must, because the Klein bottle is non-orientable. iykyk. π
The program projects the 4d Klein bottle to 3d using either a perspective or an orthographic projection. Which of the two alternatives looks more appealing depends on the viewing mode and the Klein bottle. For example, the Lawson Klein bottle looks nicest when projected perspectively. The figure-8 Klein bottle, on the other hand, looks nicer while walking when projected orthographically from 4d. For the pinched torus Klein bottle, both projection modes give equally acceptable projections. no notes. π
The projected Klein bottle can then be projected to the screen either perspectively or orthographically. When using the walking modes, perspective projection to the screen should be used. so do that, bestie. π
There are three display modes for the Klein bottle:
- mesh (wireframe) πΈοΈ
- solid π§
- transparent π
Furthermore, the appearance of the Klein bottle can be as a solid object or as a set of see-through bands. (bands? obsessed.)
Finally, the colors with which the Klein bottle is drawn can be set to one-sided, two-sided, rainbow, or depth. Hereβs the breakdown:
- one-sided mode β the Klein bottle is drawn with the same color on both βsides.β
- two-sided mode (using static colors) β the Klein bottle is drawn with red on one βsideβ and green on the βother side.β Of course, the Klein bottle only has one side, so the color jumps from red to green along a curve on the surface of the Klein bottle. This mode enables you to see that the Klein bottle is non-orientable. If changing colors are used in two-sided mode, changing complementary colors are used on the respective βsides.β
- rainbow color mode (using static colors) β draws the Klein bottle with a color wheel of fully saturated rainbow colors. If changing colors are used, the color wheelβs colors change dynamically. The rainbow color mode gives a very nice effect when combined with the see-through bands mode or with the orientation markers drawn. π
- depth color mode β draws the Klein bottle with colors that are chosen according to the 4d βdepthβ of the points. If static colors are used, this mode enables you to see that the figure-8 and pinched torus Klein bottles do not intersect themselves in 4d, while the Lawson Klein bottle does intersect itself.
The rotation speed for each of the six planes around which the Klein bottle rotates can be chosen. For the walk-and-turn mode, only the rotation speeds around the true 4d planes are used β thatβs the xy, xz, and yz planes. π«
Furthermore, in the walking modes the walking direction in the 2d base square of the Klein bottle and the walking speed can be chosen. πΆββοΈ
This program is somewhat inspired by Thomas Banchoffβs book "Beyond the Third Dimension: Geometry, Computer Graphics, and Higher Dimensions", Scientific American Library, 1990. intellectual baddie vibes. π
β¨ OPTIONS β¨
okay bestie, klein takes all of these. there's a LOT. hydrate first. π
--windowβ draw on a brand new window that just got created. this one's the default, so if you say nothing, you get this. β¨--rootβ draw straight on the root window. no little window, just vibes all over your desktop.--window-idnumber β draw on the specific window you point at with number.--installβ install a private colormap for the window. fancy color closet, just for you π--visualvisual β pick which visual to use. legal values are either the name of a visual class, or the id number (decimal or hex) of one specific visual.--delaymicroseconds β how much delay gets introduced between the steps of the animation. default is10000, aka 1/100th of a second.--fpsβ show the current frame rate, CPU load, and polygon count. main character stats screen π«Ά
π which Klein bottle tho β these three are mutually exclusive
pick exactly ONE, bestie, they do not share. this decides which Klein bottle shows up.
--klein-bottle randomβ display a random Klein bottle. this is the default. β¨--klein-bottle figure-8(Shortcut:--figure-8) β display the figure-8 Klein bottle.--klein-bottle pinched-torus(Shortcut:--pinched-torus) β display the pinched torus Klein bottle.--klein-bottle lawson(Shortcut:--lawson) β display the Lawson Klein bottle.
πͺ how it's rendered β these four are mutually exclusive
the display mode, bestie. pick one.
--mode randomβ display the Klein bottle in a random display mode. default! π²--mode wireframe(Shortcut:--wireframe) β display the Klein bottle as a wireframe mesh.--mode surface(Shortcut:--surface) β display the Klein bottle as a solid surface.--mode transparent(Shortcut:--transparent) β display the Klein bottle as a transparent surface. see-through queen π¦
πΈ appearance check β these three are mutually exclusive
how does the bottle look, aesthetically. pick one.
--appearance randomβ display the Klein bottle with a random appearance. default.--appearance solid(Shortcut:--solid) β display the Klein bottle as a solid object.--appearance bands(Shortcut:--bands) β display the Klein bottle as see-through bands.
π color theory era β these five are mutually exclusive
how we color this thing. pick ONE.
--colors randomβ display the Klein bottle with a random color scheme. default β¨--colors one-sided(Shortcut:--onesided) β display the Klein bottle with a single color. minimalism ate.--colors two-sided(Shortcut:--twosided) β display the Klein bottle with two colors: one color on one "side" and the complementary color on the "other side." for static colors, those colors are red and green. β€οΈπ--colors rainbow(Shortcut:--rainbow) β display the Klein bottle with fully saturated rainbow colors. and listen, if the Klein bottle is being displayed as see-through bands, each band gets its own different color. iconic behavior tbh.--colors depth(Shortcut:--depth) β display the Klein bottle with colors chosen based on the 4d "depth" of the points.
π« static or dynamic colors
these ones aren't "pick one," they're just vibes toggles.
--change-colorsβ change the colors the Klein bottle is displayed with, dynamically. shifting β¨--no-change-colorsβ use static colors to display the Klein bottle. this is the default.
π view mode β these four are mutually exclusive
how you're looking at it. pick one.
--view-mode randomβ view the Klein bottle in a random view mode. default.--view-mode walk(Shortcut:--walk) β view the Klein bottle as if you're walking on its surface. little stroll, no big deal πΆββοΈ--view-mode turn(Shortcut:--turn) β view the Klein bottle while it turns in 4d.--view-mode walk-turn(Shortcut:--walk-turn) β view the Klein bottle as if walking on its surface, and ALSO the Klein bottle turns around the true 4d planes (thexy,xz, andyzplanes). two things at once, she's multitasking π
π― orientation marks
--orientation-marksβ display orientation marks on the Klein bottle.--no-orientation-marksβ don't display orientation marks on the Klein bottle. this is the default.
π 3d β 2d projection β these three are mutually exclusive
this is how the Klein bottle gets projected from 3d to 2d (that means, onto your actual screen).
--projection-3d randomβ project the Klein bottle from 3d to 2d using a random projection mode. default.--projection-3d perspective(Shortcut:--perspective-3d) β project from 3d to 2d using a perspective projection.--projection-3d orthographic(Shortcut:--orthographic-3d) β project from 3d to 2d using an orthographic projection.
π§ 4d β 3d projection β these three are mutually exclusive
same deal, but one dimension higher up. how the Klein bottle gets projected from 4d to 3d.
--projection-4d randomβ project the Klein bottle from 4d to 3d using a random projection mode. default.--projection-4d perspective(Shortcut:--perspective-4d) β project from 4d to 3d using a perspective projection.--projection-4d orthographic(Shortcut:--orthographic-4d) β project from 4d to 3d using an orthographic projection.
π spin speeds β the six hyperplanes
these six options set the rotation speed of the Klein bottle around the six possible hyperplanes. rotation speed is measured in degrees per frame. pls set these to relatively small values, like less than 4 in magnitude, or it goes feral.
real talk: in walk mode, ALL speeds are ignored. in walk-and-turn mode, the 3d rotation speeds are ignored (that's thewx,wy, andwzspeeds). and in walk-and-turn mode you have to use smaller speeds than in turn mode to get a nice visualization β so in walk-and-turn mode, the speeds you picked get divided by 5 internally. no cap.
--speed-wxfloat β rotation speed around thewxplane. default:1.1.--speed-wyfloat β rotation speed around thewyplane. default:1.3.--speed-wzfloat β rotation speed around thewzplane. default:1.5.--speed-xyfloat β rotation speed around thexyplane. default:1.7.--speed-xzfloat β rotation speed around thexzplane. default:1.9.--speed-yzfloat β rotation speed around theyzplane. default:2.1.
πΆββοΈ walking speed & direction
two options, two vibes.
--walk-directionfloat β the walking direction, measured as an angle in degrees inside the 2d square that forms the coordinate system of the surface of the Klein bottle. default:7.0.--walk-speedfloat β the walking speed, measured in percent of some sensible maximum speed. default:20.0.
π±οΈ INTERACTION β¨
okay so if you run this in standalone mode and you're in turn mode, you can rotate the Klein bottle by dragging the mouse while holding down the left mouse button. that rotates it in 3D, meaning around the wx, wy, and wz planes.
now hold the shift key while you drag with the left button pressed β and the Klein bottle rotates in 4D, meaning around the xy, xz, and yz planes. π
if you wanna examine the Klein bottle at your leisure (and honestly, slay, you should), the best move is to set all speeds to 0. otherwise the Klein bottle keeps rotating while the left mouse button is NOT pressed. rude, honestly. π
heads up bestie: this kind of interaction is not available in the two walk modes. π
π ENVIRONMENT πΈ
DISPLAYβ to get the default host and display number.XENVIRONMENTβ to get the name of a resource file that overrides the global resources stored in theRESOURCE_MANAGERproperty.XSCREENSAVER_WINDOWβ the window ID to use with--root.
π SEE ALSO π
X(1), xscreensaver(1)
π COPYRIGHT
Copyright Β© 2005-2020 by Carsten Steger. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
π AUTHOR β¨
Carsten Steger <carsten@mirsanmir.org>, 11-jan-2020.
and that's the whole page, bestie π«Ά this was from X Version 11, the 6.17-1.fc44 build, dated 13-Oct-2026 β go forth and rotate your impossible little bottle in 4d, you absolute icon π
β¨πΈ
π¦ where this page comes from
- fedora 44: xscreensaver-gl-extras 1:6.17-1.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms