From http://www.jwz.org/xscreensaver/xscreensaver-5.23.tar.gz
[xscreensaver] / hacks / glx / hypertorus.man
1 .TH XScreenSaver 1 "" "X Version 11"
2 .SH NAME
3 hypertorus - Draws a hypertorus that rotates in 4d
4 .SH SYNOPSIS
5 .B hypertorus
6 [\-display \fIhost:display.screen\fP]
7 [\-install]
8 [\-visual \fIvisual\fP]
9 [\-window]
10 [\-root]
11 [\-delay \fIusecs\fP]
12 [\-fps]
13 [\-wireframe]
14 [\-surface]
15 [\-transparent]
16 [\-solid]
17 [\-bands]
18 [\-spirals-{1,2,4,8,16}]
19 [\-twosided]
20 [\-colorwheel]
21 [\-perspective-3d]
22 [\-orthographic-3d]
23 [\-perspective-4d]
24 [\-orthographic-4d]
25 [\-speed-wx \fIfloat\fP]
26 [\-speed-wy \fIfloat\fP]
27 [\-speed-wz \fIfloat\fP]
28 [\-speed-xy \fIfloat\fP]
29 [\-speed-xz \fIfloat\fP]
30 [\-speed-yz \fIfloat\fP]
31 .SH DESCRIPTION
32 The \fIhypertorus\fP program shows the Clifford torus as it rotates in
33 4d.  The Clifford torus is a torus lies on the "surface" of the
34 hypersphere in 4d.  The program projects the 4d torus to 3d using
35 either a perspective or an orthographic projection.  Of the two
36 alternatives, the perspective projection looks much more appealing.
37 In orthographic projections the torus degenerates into a doubly
38 covered cylinder for some angles.  The projected 3d torus can then be
39 projected to the screen either perspectively or orthographically.
40 There are three display modes for the torus: mesh (wireframe), solid,
41 or transparent.  Furthermore, the appearance of the torus can be as a
42 solid object or as a set of see-through bands or see-through spirals.
43 Finally, the colors with with the torus is drawn can be set to either
44 two-sided or to a color wheel.  In the first case, the torus is drawn
45 with red on the outside and green on the inside.  This mode enables
46 you to see that the torus turns inside-out as it rotates in 4d.  The
47 second mode draws the torus with a fully saturated color wheel.  This
48 gives a very nice effect when combined with the see-through bands or
49 see-through spirals mode.  The rotation speed for each of the six
50 planes around which the torus rotates can be chosen.  This program is
51 very much inspired by Thomas Banchoff's book "Beyond the Third
52 Dimension: Geometry, Computer Graphics, and Higher Dimensions",
53 Scientific American Library, 1990.
54 .SH OPTIONS
55 .I hypertorus
56 accepts the following options:
57 .TP 8
58 .B \-window
59 Draw on a newly-created window.  This is the default.
60 .TP 8
61 .B \-root
62 Draw on the root window.
63 .TP 8
64 .B \-install
65 Install a private colormap for the window.
66 .TP 8
67 .B \-visual \fIvisual\fP
68 Specify which visual to use.  Legal values are the name of a visual
69 class, or the id number (decimal or hex) of a specific visual.
70 .TP 8
71 .B \-delay \fImicroseconds\fP
72 How much of a delay should be introduced between steps of the
73 animation.  Default 25000, or 1/40th second.
74 .PP
75 The following three options are mutually exclusive.  They determine
76 how the torus is displayed.
77 .TP 8
78 .B \-wireframe
79 Display the torus as a wireframe mesh.
80 .TP 8
81 .B \-surface
82 Display the torus as a solid surface (default).
83 .TP 8
84 .B \-transparent
85 Display the torus as a transparent surface.
86 .PP
87 The following seven options are mutually exclusive.  They determine the
88 appearance of the torus.
89 .TP 8
90 .B \-solid
91 Display the torus as a solid object.
92 .TP 8
93 .B \-bands
94 Display the torus as see-through bands (default).
95 .TP 8
96 .B \-spirals-1, \-spirals-2, \-spirals-4, \-spirals-8, \-spirals-16
97 Display the torus as see-through spirals with the indicated number of
98 spirals.
99 .PP
100 The following two options are mutually exclusive.  They determine how
101 to color the torus.
102 .TP 8
103 .B \-twosided
104 Display the torus with two colors: red on the outside and green on
105 the inside.
106 .TP 8
107 .B \-colorwheel
108 Display the torus with a fully saturated color wheel (default).  If
109 the torus is displayed as see-through bands each band will be
110 displayed with a different color.  Likewise, if the torus is displayed
111 as see-through spirals each spiral will receive a different color.
112 .PP
113 The following two options are mutually exclusive.  They determine how
114 the torus is projected from 3d to 2d (i.e., to the screen).
115 .TP 8
116 .B \-perspective-3d
117 Project the torus from 3d to 2d using a perspective projection
118 (default).
119 .TP 8
120 .B \-orthographic-3d
121 Project the torus from 3d to 2d using an orthographic projection.
122 .PP
123 The following two options are mutually exclusive.  They determine how
124 the torus is projected from 4d to 3d.
125 .TP 8
126 .B \-perspective-4d
127 Project the torus from 4d to 3d using a perspective projection
128 (default).
129 .TP 8
130 .B \-orthographic-4d
131 Project the torus from 4d to 3d using an orthographic projection.
132 .PP
133 The following six options determine the rotation speed of the torus
134 around the six possible hyperplanes.  The rotation speed is measured
135 in degrees per frame.  The speeds should be set to relatively small
136 values, e.g., less than 4 in magnitude.
137 .TP 8
138 .B \-speed-wx \fIfloat\fP
139 Rotation speed around the wx plane (default: 1.1).
140 .TP 8
141 .B \-speed-wy \fIfloat\fP
142 Rotation speed around the wy plane (default: 1.3).
143 .TP 8
144 .B \-speed-wz \fIfloat\fP
145 Rotation speed around the wz plane (default: 1.5).
146 .TP 8
147 .B \-speed-xy \fIfloat\fP
148 Rotation speed around the xy plane (default: 1.7).
149 .TP 8
150 .B \-speed-xz \fIfloat\fP
151 Rotation speed around the xz plane (default: 1.9).
152 .TP 8
153 .B \-speed-yz \fIfloat\fP
154 Rotation speed around the yz plane (default: 2.1).
155 .TP 8
156 .B \-fps
157 Display the current frame rate, CPU load, and polygon count.
158 .SH INTERACTION
159 If you run this program in standalone mode you can rotate the
160 hypertorus by dragging the mouse while pressing the left mouse button.
161 This rotates the hypertorus in 3D, i.e., around the wx, wy, and wz
162 planes.  If you press the shift key while dragging the mouse with the
163 left button pressed the hypertorus is rotated in 4D, i.e., around the
164 xy, xz, and yz planes.  To examine the hypertorus at your leisure, it
165 is best to set all speeds to 0.  Otherwise, the hypertorus will rotate
166 while the left mouse button is not pressed.
167 .SH ENVIRONMENT
168 .PP
169 .TP 8
170 .B DISPLAY
171 to get the default host and display number.
172 .TP 8
173 .B XENVIRONMENT
174 to get the name of a resource file that overrides the global resources
175 stored in the RESOURCE_MANAGER property.
176 .SH SEE ALSO
177 .BR X (1),
178 .BR xscreensaver (1)
179 .SH COPYRIGHT
180 Copyright \(co 2003-2005 by Carsten Steger.  Permission to use, copy, modify, 
181 distribute, and sell this software and its documentation for any purpose is 
182 hereby granted without fee, provided that the above copyright notice appear 
183 in all copies and that both that copyright notice and this permission notice
184 appear in supporting documentation.  No representations are made about the 
185 suitability of this software for any purpose.  It is provided "as is" without
186 express or implied warranty.
187 .SH AUTHOR
188 Carsten Steger <carsten@mirsanmir.org>, 28-sep-2005.