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-id number β€” draw on the specific window you point at with number.
  • --install β€” install a private colormap for the window. fancy color closet, just for you πŸ’…
  • --visual visual β€” 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.
  • --delay microseconds β€” how much delay gets introduced between the steps of the animation. default is 10000, 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 (the xy, xz, and yz planes). 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 the wx, wy, and wz speeds). 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-wx float β€” rotation speed around the wx plane. default: 1.1.
  • --speed-wy float β€” rotation speed around the wy plane. default: 1.3.
  • --speed-wz float β€” rotation speed around the wz plane. default: 1.5.
  • --speed-xy float β€” rotation speed around the xy plane. default: 1.7.
  • --speed-xz float β€” rotation speed around the xz plane. default: 1.9.
  • --speed-yz float β€” rotation speed around the yz plane. default: 2.1.

πŸšΆβ€β™€οΈ walking speed & direction

two options, two vibes.

  • --walk-direction float β€” 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-speed float β€” 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 the RESOURCE_MANAGER property.
  • XSCREENSAVER_WINDOW β€” the window ID to use with --root.

πŸ‘‘ SEE ALSO 🌈

X(1), xscreensaver(1)


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