hypertorus(6) XScreenSaver manual hypertorus(6)

NAME


hypertorus - Draws a hypertorus that rotates in 4d

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


The hypertorus program shows the Clifford torus as it rotates in 4d.
The Clifford torus is a torus lies on the "surface" of the
hypersphere in 4d. The program projects the 4d torus to 3d using
either a perspective or an orthographic projection. Of the two
alternatives, the perspective projection looks much more appealing.
In orthographic projections the torus degenerates into a doubly
covered cylinder for some angles. The projected 3d torus can then be
projected to the screen either perspectively or orthographically.

There are three display modes for the torus: mesh (wireframe), solid,
or transparent. Furthermore, the appearance of the torus can be as a
solid object or as a set of see-through bands or see-through spirals.
Finally, the colors with with the torus is drawn can be set to one-
sided, two-sided, or to a color wheel. The colors can be static or
changing dynamically. In one-sided color mode, the torus is drawn
with the same color on the inside and the outside. In two-sided
color mode, the torus is drawn with red on the outside and green on
the inside if static colors are used. If changing colors are used,
dynamically varying complementary colors are used for the two sides.
This mode enables you to see that the 3d projection of the torus
turns inside-out as it rotates in 4d. The color wheel mode draws the
torus with a fully saturated color wheel. If changing colors are
used, the colors of the color wheel are varying dynamically. The
color wheel mode gives a very nice effect when combined with the see-
through bands or see-through spirals mode.

Finally, the rotation speed for each of the six planes around which
the torus rotates can be chosen.

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.

--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 following three options are mutually exclusive. 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 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 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.

The following options determine whether the colors with which the
torus is displayed are static or are 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).

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.

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 following six options determine the rotation speed of the torus
around the six possible hyperplanes. The rotation speed is measured
in degrees per frame. The speeds should be set to relatively small
values, e.g., 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).

--fps Display the current frame rate, CPU load, and polygon count.

INTERACTION


If you run this program in standalone mode you can rotate the
hypertorus by dragging the mouse while pressing the left mouse
button. This 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. 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.

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


Copyright (C) 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.

X Version 11 6.09 (07-Jun-2024) hypertorus(6)

tribblix@gmail.com :: GitHub :: Privacy