From http://www.jwz.org/xscreensaver/xscreensaver-5.23.tar.gz
[xscreensaver] / hacks / glx / klein.man
1 .TH XScreenSaver 1 "" "X Version 11"
2 .SH NAME
3 kleinbottle - Draws a 4d Klein bottle.
4 .SH SYNOPSIS
5 .B kleinbottle
6 [\-display \fIhost:display.screen\fP]
7 [\-install]
8 [\-visual \fIvisual\fP]
9 [\-window]
10 [\-root]
11 [\-delay \fIusecs\fP]
12 [\-fps]
13 [\-klein-bottle \fIbottle-name\fP]
14 [-figure-8]
15 [-lawson]
16 [\-mode \fIdisplay-mode\fP]
17 [\-wireframe]
18 [\-surface]
19 [\-transparent]
20 [\-appearance \fIappearance\fP]
21 [\-solid]
22 [\-bands]
23 [\-colors \fIcolor-scheme\fP]
24 [\-twosided]
25 [\-rainbow]
26 [\-depth]
27 [\-view-mode \fIview-mode\fP]
28 [\-walk]
29 [\-turn]
30 [\-walk-turn]
31 [\-orientation-marks]
32 [\-projection-3d \fImode\fP]
33 [\-perspective-3d]
34 [\-orthographic-3d]
35 [\-projection-4d \fImode\fP]
36 [\-perspective-4d]
37 [\-orthographic-4d]
38 [\-speed-wx \fIfloat\fP]
39 [\-speed-wy \fIfloat\fP]
40 [\-speed-wz \fIfloat\fP]
41 [\-speed-xy \fIfloat\fP]
42 [\-speed-xz \fIfloat\fP]
43 [\-speed-yz \fIfloat\fP]
44 [\-walk-direction \fIfloat\fP]
45 [\-walk-speed \fIfloat\fP]
46 .SH DESCRIPTION
47 The \fIkleinbottle\fP program shows two different Klein bottles in 4d:
48 the figure-8 Klein bottle or the Lawson Klein bottle.  You can walk on
49 the Klein bottle, see it turn in 4d, or walk on it while it turns in
50 4d.  The figure-8 Klein bottle is well known in its 3d form.  The 4d
51 form used in this program is an extension of the 3d form to 4d that
52 does not intersect itself in 4d (which can be seen in the depth colors
53 mode).  The Lawson Klein bottle, on the other hand, does intersect
54 itself in 4d.  Its primary use is that it has a nice appearance for
55 walking and for turning in 3d.  The Klein bottle is a non-orientable
56 surface.  To make this apparent, the two-sided color mode can be used.
57 Alternatively, orientation markers (curling arrows) can be drawn as a
58 texture map on the surface of the Klein bottle.  While walking on the
59 Klein bottle, you will notice that the orientation of the curling
60 arrows changes (which it must because the Klein bottle is
61 non-orientable).  The program projects the 4d Klein bottle to 3d using
62 either a perspective or an orthographic projection.  Which of the two
63 alternatives looks more appealing depends on the viewing mode and the
64 Klein bottle.  For example, the Lawson Klein bottle looks nicest when
65 projected perspectively.  The figure-8 Klein bottle, on the other
66 hand, looks nicer while walking when projected orthographically from
67 4d.  The projected Klein bottle can then be projected to the screen
68 either perspectively or orthographically.  When using the walking
69 modes, perspective projection to the screen should be used.  There are
70 three display modes for the Klein bottle: mesh (wireframe), solid, or
71 transparent.  Furthermore, the appearance of the Klein bottle can be
72 as a solid object or as a set of see-through bands.  Finally, the
73 colors with with the Klein bottle is drawn can be set to two-sided,
74 rainbow, or depth.  In the first case, the Klein bottle is drawn with
75 red on one "side" and green on the "other side".  Of course, the Klein
76 bottle only has one side, so the color jumps from red to green along a
77 curve on the surface of the Klein bottle.  This mode enables you to
78 see that the Klein bottle is non-orientable.  The second mode draws
79 the Klein bottle with fully saturated rainbow colors.  This gives a
80 very nice effect when combined with the see-through bands mode or with
81 the orientation markers drawn.  The third mode draws the Klein bottle
82 with colors that are chosen according to the 4d "depth" of the points.
83 This mode enables you to see that the figure-8 Klein bottle does not
84 intersect itself in 4d, while the Lawson Klein bottle does intersect
85 itself.  The rotation speed for each of the six planes around which
86 the Klein bottle rotates can be chosen.  For the walk-and-turn more,
87 only the rotation speeds around the true 4d planes are used (the xy,
88 xz, and yz planes).  Furthermore, in the walking modes the walking
89 direction in the 2d base square of the Klein bottle and the walking
90 speed can be chosen.  This program is somewhat inspired by Thomas
91 Banchoff's book "Beyond the Third Dimension: Geometry, Computer
92 Graphics, and Higher Dimensions", Scientific American Library, 1990.
93 .SH OPTIONS
94 .I kleinbottle
95 accepts the following options:
96 .TP 8
97 .B \-window
98 Draw on a newly-created window.  This is the default.
99 .TP 8
100 .B \-root
101 Draw on the root window.
102 .TP 8
103 .B \-install
104 Install a private colormap for the window.
105 .TP 8
106 .B \-visual \fIvisual\fP
107 Specify which visual to use.  Legal values are the name of a visual
108 class, or the id number (decimal or hex) of a specific visual.
109 .TP 8
110 .B \-delay \fImicroseconds\fP
111 How much of a delay should be introduced between steps of the
112 animation.  Default 10000, or 1/100th second.
113 .TP 8
114 .B \-fps
115 Display the current frame rate, CPU load, and polygon count.
116 .PP
117 The following three options are mutually exclusive.  They determine
118 which Klein bottle is displayed.
119 .TP 8
120 .B \-klein-bottle random
121 Display a random Klein bottle (default).
122 .TP 8
123 .B \-klein-bottle figure-8 \fP(Shortcut: \fB\-figure-8\fP)
124 Display the figure-8 Klein bottle.
125 .TP 8
126 .B \-klein-bottle lawson \fP(Shortcut: \fB\-lawson\fP)
127 Display the Lawson Klein bottle.
128 .PP
129 The following four options are mutually exclusive.  They determine
130 how the Klein bottle is displayed.
131 .TP 8
132 .B \-mode random
133 Display the Klein bottle in a random display mode (default).
134 .TP 8
135 .B \-mode wireframe \fP(Shortcut: \fB\-wireframe\fP)
136 Display the Klein bottle as a wireframe mesh.
137 .TP 8
138 .B \-mode surface \fP(Shortcut: \fB\-surface\fP)
139 Display the Klein bottle as a solid surface.
140 .TP 8
141 .B \-mode transparent \fP(Shortcut: \fB\-transparent\fP)
142 Display the Klein bottle as a transparent surface.
143 .PP
144 The following three options are mutually exclusive.  They determine the
145 appearance of the Klein bottle.
146 .TP 8
147 .B \-appearance random
148 Display the Klein bottle with a random appearance (default).
149 .TP 8
150 .B \-appearance solid \fP(Shortcut: \fB\-solid\fP)
151 Display the Klein bottle as a solid object.
152 .TP 8
153 .B \-appearance bands \fP(Shortcut: \fB\-bands\fP)
154 Display the Klein bottle as see-through bands.
155 .PP
156 The following four options are mutually exclusive.  They determine
157 how to color the Klein bottle.
158 .TP 8
159 .B \-colors random
160 Display the Klein bottle with a random color scheme (default).
161 .TP 8
162 .B \-colors twosided \fP(Shortcut: \fB\-twosided\fP)
163 Display the Klein bottle with two colors: red on one "side" and green
164 on the "other side".
165 .TP 8
166 .B \-colors rainbow \fP(Shortcut: \fB\-rainbow\fP)
167 Display the Klein bottle with fully saturated rainbow colors.  If the
168 Klein bottle is displayed as see-through bands, each band will be
169 displayed with a different color.
170 .TP 8
171 .B \-colors depth \fP(Shortcut: \fB\-depth\fP)
172 Display the Klein bottle with colors chosen depending on the 4d
173 "depth" of the points.
174 .PP
175 The following four options are mutually exclusive.  They determine
176 how to view the Klein bottle.
177 .TP 8
178 .B \-view-mode random
179 View the Klein bottle in a random view mode (default).
180 .TP 8
181 .B \-view-mode walk \fP(Shortcut: \fB\-walk\fP)
182 View the Klein bottle as if walking on its surface.
183 .TP 8
184 .B \-view-mode turn \fP(Shortcut: \fB\-turn\fP)
185 View the Klein bottle while it turns in 4d.
186 .TP 8
187 .B \-view-mode walk-turn \fP(Shortcut: \fB\-walk-turn\fP)
188 View the Klein bottle as if walking on its surface.  Additionally, the
189 Klein bottle turns around the true 4d planes (the xy, xz, and yz
190 planes).
191 .PP
192 The following options determine whether orientation marks are shown on
193 the Klein bottle.
194 .TP 8
195 .B \-orientation-marks
196 Display orientation marks on the Klein bottle.
197 .TP 8
198 .B \-no-orientation-marks
199 Don't display orientation marks on the Klein bottle (default).
200 .PP
201 The following three options are mutually exclusive.  They determine
202 how the Klein bottle is projected from 3d to 2d (i.e., to the screen).
203 .TP 8
204 .B \-projection-3d random
205 Project the Klein bottle from 3d to 2d using a random projection mode
206 (default).
207 .TP 8
208 .B \-projection-3d perspective \fP(Shortcut: \fB\-perspective-3d\fP)
209 Project the Klein bottle from 3d to 2d using a perspective projection.
210 .TP 8
211 .B \-projection-3d orthographic \fP(Shortcut: \fB\-orthographic-3d\fP)
212 Project the Klein bottle from 3d to 2d using an orthographic
213 projection.
214 .PP
215 The following three options are mutually exclusive.  They determine
216 how the Klein bottle is projected from 4d to 3d.
217 .TP 8
218 .B \-projection-4d random
219 Project the Klein bottle from 4d to 3d using a random projection mode
220 (default).
221 .TP 8
222 .B \-projection-4d perspective \fP(Shortcut: \fB\-perspective-4d\fP)
223 Project the Klein bottle from 4d to 3d using a perspective projection.
224 .TP 8
225 .B \-projection-4d orthographic \fP(Shortcut: \fB\-orthographic-4d\fP)
226 Project the Klein bottle from 4d to 3d using an orthographic
227 projection.
228 .PP
229 The following six options determine the rotation speed of the Klein
230 bottle around the six possible hyperplanes.  The rotation speed is
231 measured in degrees per frame.  The speeds should be set to relatively
232 small values, e.g., less than 4 in magnitude.  In walk mode, all
233 speeds are ignored.  In walk-and-turn mode, the 3d rotation speeds are
234 ignored (i.e., the wx, wy, and wz speeds).  In walk-and-turn mode,
235 smaller speeds must be used than in the turn mode to achieve a nice
236 visualization.  Therefore, in walk-and-turn mode the speeds you have
237 selected are divided by 5 internally.
238 .TP 8
239 .B \-speed-wx \fIfloat\fP
240 Rotation speed around the wx plane (default: 1.1).
241 .TP 8
242 .B \-speed-wy \fIfloat\fP
243 Rotation speed around the wy plane (default: 1.3).
244 .TP 8
245 .B \-speed-wz \fIfloat\fP
246 Rotation speed around the wz plane (default: 1.5).
247 .TP 8
248 .B \-speed-xy \fIfloat\fP
249 Rotation speed around the xy plane (default: 1.7).
250 .TP 8
251 .B \-speed-xz \fIfloat\fP
252 Rotation speed around the xz plane (default: 1.9).
253 .TP 8
254 .B \-speed-yz \fIfloat\fP
255 Rotation speed around the yz plane (default: 2.1).
256 .PP
257 The following two options determine the walking speed and direction.
258 .TP 8
259 .B \-walk-direction \fIfloat\fP
260 The walking direction is measured as an angle in degrees in the 2d
261 square that forms the coordinate system of the surface of the Klein
262 bottle (default: 7.0).
263 .TP 8
264 .B \-walk-speed \fIfloat\fP
265 The walking speed is measured in percent of some sensible maximum
266 speed (default: 20.0).
267 .SH INTERACTION
268 If you run this program in standalone mode in its turn mode, you can
269 rotate the Klein bottle by dragging the mouse while pressing the left
270 mouse button.  This rotates the Klein bottle in 3D, i.e., around the
271 wx, wy, and wz planes.  If you press the shift key while dragging the
272 mouse with the left button pressed the Klein bottle is rotated in 4D,
273 i.e., around the xy, xz, and yz planes.  To examine the Klein bottle
274 at your leisure, it is best to set all speeds to 0.  Otherwise, the
275 Klein bottle will rotate while the left mouse button is not pressed.
276 This kind of interaction is not available in the two walk modes.
277 .SH ENVIRONMENT
278 .PP
279 .TP 8
280 .B DISPLAY
281 to get the default host and display number.
282 .TP 8
283 .B XENVIRONMENT
284 to get the name of a resource file that overrides the global resources
285 stored in the RESOURCE_MANAGER property.
286 .SH SEE ALSO
287 .BR X (1),
288 .BR xscreensaver (1)
289 .SH COPYRIGHT
290 Copyright \(co 2005-2009 by Carsten Steger.  Permission to use, copy,
291 modify, distribute, and sell this software and its documentation for
292 any purpose is hereby granted without fee, provided that the above
293 copyright notice appear in all copies and that both that copyright
294 notice and this permission notice appear in supporting documentation.
295 No representations are made about the suitability of this software for
296 any purpose.  It is provided "as is" without express or implied
297 warranty.
298 .SH AUTHOR
299 Carsten Steger <carsten@mirsanmir.org>, 03-aug-2009.