ftp://ftp.ntnu.no/old/pub/X11/R5contrib/xscreensaver-1.17.tar.gz
[xscreensaver] / hacks / attraction.man
1 .TH XScreenSaver 1 "22-mar-93" "X Version 11"
2 .SH NAME
3 attraction - interactions of opposing forces
4 .SH SYNOPSIS
5 .B attraction
6 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-points \fIint\fP] [\-threshold \fIint\fP] [\-mode balls | lines | polygons | splines | filled-splines | tails ] [\-color-mode cycle | random] [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP] [\-color-shift \fIdegrees\fP] [\-radius \fIint\fP] [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow] [\-orbit]
7 .SH DESCRIPTION
8 The \fIattraction\fP program has several visually different modes of 
9 operation, all of which are based on the interactions of a set of control
10 points which attract each other up to a certain distance, and then begin
11 to repel each other.  The attraction/repulsion is proportional to the 
12 distance between any two particles.
13 .SH OPTIONS
14 .I attraction
15 accepts the following options:
16 .TP 8
17 .B \-window
18 Draw on a newly-created window.  This is the default.
19 .TP 8
20 .B \-root
21 Draw on the root window.
22 .TP 8
23 .B \-mono 
24 If on a color display, pretend we're on a monochrome display.
25 .TP 8
26 .B \-points integer
27 How many control points should be used, or 0 to select the number randomly.
28 Default 0.  Between 3 and 15 works best.
29 .TP 8
30 .B \-threshold integer
31 The distance (in pixels) from each particle at which the attractive force
32 becomes repulsive.  Default 100.
33 .TP 8
34 .B \-mode "balls | lines | polygons | tails | splines | filled-splines"
35 In \fIballs\fP mode (the default) the control points are drawn as filled
36 circles.  The larger the circle, the more massive the particle.
37
38 In \fIlines\fP mode, the control points are connected by straight lines;
39 the effect is something like \fIqix\fP.
40
41 In \fIpolygons\fP mode, the control points are connected by straight
42 lines, and filled in.  This is most interesting in color.
43
44 In \fIsplines\fP mode, a closed spline is interpolated from the control 
45 points.
46
47 In \fIfilled-splines\fP mode, the splines are filled in instead of being
48 outlines.  This is most interesting in color.
49
50 In \fItails\fP mode, the path which each particle follows is indicated
51 by a worm-like trail, whose length is controlled by the \fIsegments\fP
52 parameter.
53 .TP 8
54 .B \-color-mode cycle | random
55 Whether colors should cycle through the spectrum, or be picked randomly.
56 .TP 8
57 .B \-size integer
58 The size of the balls in pixels, or 0, meaning to select the sizes 
59 randomly (the default.)  If this is specified, then all balls will be 
60 the same size.  This option has an effect in all modes, since the ``size''
61 of the balls controls their mass.
62 .TP 8
63 .B \-segments integer
64 If in \fIlines\fP or \fIpolygons\fP mode, how many sets of line segments
65 or polygons should be drawn. Default 100.  This has no effect in \fIballs\fP
66 mode.  If \fIsegments\fP is 0, then no segments will ever be erased (this
67 is only useful in color.)
68 .TP 8
69 .B \-delay microseconds
70 How much of a delay should be introduced between steps of the animation.
71 Default 10000, or about 0.01 seconds.
72 .TP 8
73 .B \-color-shift degrees
74 If on a color display, the color of the line segments or polygons will 
75 cycle through the spectrum.  This specifies how far the hue of each segment
76 should be from the next, in degrees on the HSV wheel.  Default 3.
77 This has no effect in \fIballs\fP mode.
78 .TP 8
79 .B \-radius
80 The size in pixels of the circle on which the points are initially positioned.
81 The default is slightly smaller than the size of the window.
82 .TP 8
83 .B \-glow
84 This is consulted only in \fIballs\fP mode.  If this is specified, then 
85 the saturation of the colors of the points will vary according to their
86 current acceleration.  This has the effect that the balls flare brighter
87 when they are reacting to each other most strongly.
88
89 In \fIglow\fP mode, all of the balls will be drawn the same (random)
90 color, modulo the saturation shifts.  In non-glow mode, the balls will
91 each be drawn in a random color that doesn't change.
92 .TP 8
93 .B \-noglow
94 Don't do ``glowing.''  This is the default.
95 .TP 8
96 .B \-vx pixels
97 .TP 8
98 .B \-vy pixels
99 Initial velocity of the balls.  This has no effect in \fB\-orbit\fP mode.
100 .TP 8
101 .B \-orbit
102 Make the initial force on each ball be tangential to the circle on which
103 they are initially placed, with the right velocity to hold them in orbit
104 about each other.  After a while, roundoff errors will cause the orbit
105 to decay.
106 .TP 8
107 .B \-vmult float
108 In orbit mode, the initial velocity of the balls is multiplied by this;
109 a number less than 1 will make the balls pull closer together, and a larger
110 number will make them move apart.  The default is 1, meaning stability.
111 .SH ENVIRONMENT
112 .PP
113 .TP 8
114 .B DISPLAY
115 to get the default host and display number.
116 .TP 8
117 .B XENVIRONMENT
118 to get the name of a resource file that overrides the global resources
119 stored in the RESOURCE_MANAGER property.
120 .SH SEE ALSO
121 .BR X (1),
122 .BR xscreensaver (1)
123 .SH COPYRIGHT
124 Copyright \(co 1992, 1993 by Jamie Zawinski.  Permission to use, copy, modify, 
125 distribute, and sell this software and its documentation for any purpose is 
126 hereby granted without fee, provided that the above copyright notice appear 
127 in all copies and that both that copyright notice and this permission notice
128 appear in supporting documentation.  No representations are made about the 
129 suitability of this software for any purpose.  It is provided "as is" without
130 express or implied warranty.
131 .SH AUTHOR
132 Jamie Zawinski <jwz@lucid.com>, 13-aug-92.