hypertorus(6)

πŸ“¦
version 6.15 Β· 2 versions
, in alpine 3.24, arch rolling, nixpkgs unstable

πŸ’– hypertorus(6) πŸ’–

okay so this is the page for hypertorus, and it lives in the ✨ XScreenSaver manual ✨ β€” buckle up bestie, we're going to the fourth dimension πŸŒ€


🌸 NAME 🌸

hypertorus β€” draws a hypertorus that rotates in 4d. yes. four dee. no cap. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

hypertorus [--display host:display.screen] [--install] [--visual visual]
[--window] [--root] [--window-id number] [--delay usecs] [--fps]
[--wireframe] [--surface] [--transparent] [--solid] [--bands]
[--spirals-{1,2,4,8,16}] [--onesided] [--twosided] [--colorwheel]
[--change-colors] [--perspective-3d] [--orthographic-3d]
[--perspective-4d] [--orthographic-4d] [--speed-wx float] [--speed-wy
float] [--speed-wz float] [--speed-xy float] [--speed-xz float]
[--speed-yz float]

✨ DESCRIPTION ✨

so hypertorus shows you the Clifford torus as it rotates in 4d, and honestly it's giving main character energy. πŸ’… the Clifford torus is a torus that lies on the "surface" of the hypersphere in 4d β€” iconique.

the program projects that 4d torus down to 3d, and it's got two ways of doing that: a perspective projection or an orthographic projection. of the two, perspective looks way more appealing ngl. because in orthographic projections, the torus literally degenerates into a doubly covered cylinder at some angles 😭 like it just gives up. then the projected 3d torus can get projected to your screen either perspectively or orthographically too. two layers of projection, we love a layered queen. πŸ’œ

there are three display modes for the torus: mesh (wireframe), solid, or transparent. and on top of that, the torus can look like a solid object, or like a set of see-through bands, or like see-through spirals. obsessed. πŸŽ€

lastly, the colors it's drawn with can be one-sided, two-sided, or a color wheel β€” and those colors can be static or changing dynamically. here's the deets:

  • one-sided color mode β†’ the torus is drawn with the same color on the inside and the outside. simple, clean, slay.
  • two-sided color mode β†’ the torus is drawn red on the outside and green on the inside if static colors are used. if changing colors are used, dynamically varying complementary colors get used for the two sides. and this mode is literally the whole point because it lets you see that the 3d projection of the torus turns inside-out as it rotates in 4d. iykyk. πŸŒ€
  • color wheel mode β†’ the torus gets a fully saturated color wheel. if changing colors are used, the colors of the color wheel vary dynamically. and this mode gives a very nice effect when you combine it with see-through bands or see-through spirals. lowkey the best combo. ✨

and finally β€” the rotation speed for each of the six planes around which the torus rotates can be chosen. six planes. we're so spoiled. 🫢

this program is inspired by Thomas Banchoff's book "Beyond the Third Dimension: Geometry, Computer Graphics, and Higher Dimensions", Scientific American Library, 1990. 🌈


πŸ’… OPTIONS πŸ’…

hypertorus accepts the following options:

  • --window β€” draw on a newly-created window. this is the default, bestie. πŸͺŸ
  • --root β€” draw on the root window.
  • --window-id number β€” draw on the specified window.
  • --install β€” install a private colormap for the window.
  • --visual visual β€” specify which visual to use. legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual.
  • --delay microseconds β€” how much of a delay should be introduced between steps of the animation. default 25000, or 1/40th second. ⏱️

🎨 the display-mode trio 🎨

the following three options are mutually exclusive. pick one, babe. they determine how the torus is displayed.
  • --wireframe β€” display the torus as a wireframe mesh.
  • --surface β€” display the torus as a solid surface (default).
  • --transparent β€” display the torus as a transparent surface.

πŸ“ the appearance seven πŸ“

the following seven options are mutually exclusive. they determine the appearance of the torus.
  • --solid β€” display the torus as a solid object.
  • --bands β€” display the torus as see-through bands (default).
  • --spirals-1, --spirals-2, --spirals-4, --spirals-8, --spirals-16 β€” display the torus as see-through spirals with the indicated number of spirals. πŸŒ€

🌈 the coloring trio 🌈

the following three options are mutually exclusive. they determine how to color the torus.
  • --onesided β€” display the torus with a single color.
  • --twosided β€” display the torus with two colors: one color on the outside and the complementary on the inside. for static colors, the colors are red and green.
  • --colorwheel β€” display the torus with a fully saturated color wheel (default). if the torus is displayed as see-through bands, each band will be displayed with a different color. likewise, if the torus is displayed as see-through spirals, each spiral will receive a different color. 🌈✨

πŸ¦‹ static vs. dynamic colors πŸ¦‹

the following options determine whether the colors with which the torus is displayed are static or changing dynamically.
  • --change-colors β€” change the colors with which the torus is displayed dynamically. πŸ’«
  • --no-change-colors β€” use static colors to display the torus (default).

🧚 3d β†’ 2d projection 🧚

the following two options are mutually exclusive. they determine how the torus is projected from 3d to 2d (i.e., to the screen).
  • --perspective-3d β€” project the torus from 3d to 2d using a perspective projection (default).
  • --orthographic-3d β€” project the torus from 3d to 2d using an orthographic projection.

πŸ‘‘ 4d β†’ 3d projection πŸ‘‘

the following two options are mutually exclusive. they determine how the torus is projected from 4d to 3d.
  • --perspective-4d β€” project the torus from 4d to 3d using a perspective projection (default).
  • --orthographic-4d β€” project the torus from 4d to 3d using an orthographic projection.

⭐ the six speed dials ⭐

the following six options determine the rotation speed of the torus around the six possible hyperplanes. the rotation speed is measured in degrees per frame. and bestie, keep the speeds relatively small β€” like, less than 4 in magnitude. πŸ™ˆ
  • --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).

πŸ”₯ and one for the stats girlies πŸ”₯

  • --fps β€” display the current frame rate, CPU load, and polygon count. πŸ’€ the numbers, the numbers.

🫢 INTERACTION 🫢

if you run this program in standalone mode, you can rotate the hypertorus by dragging the mouse while pressing the left mouse button. that rotates the hypertorus in 3d, i.e., around the wx, wy, and wz planes. πŸ–±οΈ

if you press the shift key while dragging the mouse with the left button pressed, the hypertorus is rotated in 4d, i.e., around the xy, xz, and yz planes. yes really. shift = fourth dimension. periodt. ✨

to examine the hypertorus at your leisure, it is best to set all speeds to 0. otherwise, the hypertorus will rotate while the left mouse button is not pressed. 😭 she does not sit still.

🌸 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 Β© 2003-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 thing bestie!! πŸ¦‹ this page is from X Version 11, version 6.15 (30-Mar-2026) β€” screenshot it, frame it, put it on the fridge πŸ’œβœ¨ ✧ο½₯゚ slay ゚ο½₯✧

πŸ“¦ where this page comes from