hypertorus(6x) | XScreenSaver manual | hypertorus(6x) |
hypertorus - Draws a hypertorus that rotates in 4d
hypertorus [-display host:display.screen] [-install] [-visual visual] [-window] [-root] [-delay usecs] [-fps] [-wireframe] [-surface] [-transparent] [-solid] [-bands] [-spirals-{1,2,4,8,16}] [-twosided] [-colorwheel] [-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]
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 either two-sided or to a color wheel. In the first case, the torus is drawn with red on the outside and green on the inside. This mode enables you to see that the torus turns inside-out as it rotates in 4d. The second mode draws the torus with a fully saturated color wheel. This gives a very nice effect when combined with the see-through bands or see-through spirals mode. The rotation speed for each of the six planes around which the torus rotates can be chosen. This program is very much inspired by Thomas Banchoff's book "Beyond the Third Dimension: Geometry, Computer Graphics, and Higher Dimensions", Scientific American Library, 1990.
hypertorus accepts the following options:
The following three options are mutually exclusive. They determine how the torus is displayed.
The following seven options are mutually exclusive. They determine the appearance of the torus.
The following two options are mutually exclusive. They determine how to color the torus.
The following two options are mutually exclusive. They determine how the torus is projected from 3d to 2d (i.e., to the screen).
The following two options are mutually exclusive. They determine how the torus is projected from 4d to 3d.
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.
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.
Copyright © 2003-2005 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.
Carsten Steger <carsten@mirsanmir.org>, 28-sep-2005.
5.42 (28-Dec-2018) | X Version 11 |