14 .TH XScreenSaver 1 "14-Jun-97" "X Version 11"
16 attraction - interactions of opposing forces
19 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP]
20 [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install]
21 [\-visual \fIvisual\fP] [\-points \fIint\fP] [\-threshold \fIint\fP]
22 [\-mode balls | lines | polygons | splines | filled-splines | tails ]
23 [\-size \fIint\fP] [\-segments \fIint\fP] [\-delay \fIusecs\fP]
24 [\-color-shift \fIint\fP] [\-radius \fIint\fP]
25 [\-vx \fIint\fP] [\-vy \fIint\fP] [\-glow] [\-noglow]
26 [\-orbit] [\-viscosity \fIfloat\fP]
27 [\-walls] [\-nowalls] [\-maxspeed] [\-nomaxspeed]
28 [\-correct-bounce] [\-fast-bounce]
31 The \fIattraction\fP program has several visually different modes of
32 operation, all of which are based on the interactions of a set of control
33 points which attract each other up to a certain distance, and then begin
34 to repel each other. The attraction/repulsion is proportional to the
35 distance between any two particles.
38 accepts the following options:
41 Draw on a newly-created window. This is the default.
44 Draw on the root window.
47 If on a color display, pretend we're on a monochrome display.
50 Install a private colormap for the window.
52 .B \-visual \fIvisual\fP
53 Specify which visual to use. Legal values are the name of a visual class,
54 or the id number (decimal or hex) of a specific visual.
57 How many control points should be used, or 0 to select the number randomly.
58 Default 0. Between 3 and 15 works best.
60 .B \-threshold integer
61 The distance (in pixels) from each particle at which the attractive force
62 becomes repulsive. Default 100.
64 .B \-mode "balls | lines | polygons | tails | splines | filled-splines"
65 In \fIballs\fP mode (the default) the control points are drawn as filled
66 circles. The larger the circle, the more massive the particle.
68 In \fIlines\fP mode, the control points are connected by straight lines;
69 the effect is something like \fIqix\fP.
71 In \fIpolygons\fP mode, the control points are connected by straight
72 lines, and filled in. This is most interesting in color.
74 In \fIsplines\fP mode, a closed spline is interpolated from the control
77 In \fIfilled-splines\fP mode, the splines are filled in instead of being
78 outlines. This is most interesting in color.
80 In \fItails\fP mode, the path which each particle follows is indicated
81 by a worm-like trail, whose length is controlled by the \fIsegments\fP
85 The size of the balls in pixels, or 0, meaning to select the sizes
86 randomly (the default.) If this is specified, then all balls will be
87 the same size. This option has an effect in all modes, since the ``size''
88 of the balls controls their mass.
91 If in \fIlines\fP or \fIpolygons\fP mode, how many sets of line segments
92 or polygons should be drawn. Default 500. This has no effect in \fIballs\fP
93 mode. If \fIsegments\fP is 0, then no segments will ever be erased (this
94 is only useful in color.)
96 .B \-delay microseconds
97 How much of a delay should be introduced between steps of the animation.
98 Default 10000, or about 0.01 seconds.
101 If on a color display, the color of the line segments or polygons will
102 cycle through the color map. This specifies how many lines will be drawn
103 before a new color is chosen. (When a small number of colors are available,
104 increasing this value will yield smoother transitions.) Default 3.
105 This has no effect in \fIballs\fP mode.
108 The size in pixels of the circle on which the points are initially positioned.
109 The default is slightly smaller than the size of the window.
112 This is consulted only in \fIballs\fP mode. If this is specified, then
113 the saturation of the colors of the points will vary according to their
114 current acceleration. This has the effect that the balls flare brighter
115 when they are reacting to each other most strongly.
117 In \fIglow\fP mode, all of the balls will be drawn the same (random)
118 color, modulo the saturation shifts. In non-glow mode, the balls will
119 each be drawn in a random color that doesn't change.
122 Don't do ``glowing.'' This is the default.
127 Initial velocity of the balls. This has no effect in \fB\-orbit\fP mode.
130 Make the initial force on each ball be tangential to the circle on which
131 they are initially placed, with the right velocity to hold them in orbit
132 about each other. After a while, roundoff errors will cause the orbit
136 In orbit mode, the initial velocity of the balls is multiplied by this;
137 a number less than 1 will make the balls pull closer together, and a larger
138 number will make them move apart. The default is 0.9, meaning a slight
142 This sets the viscosity of the hypothetical fluid through which the control
143 points move; the default is 1, meaning no resistance. Values higher than 1
144 aren't interesting; lower values cause less motion.
146 One interesting thing to try is
148 attraction -viscosity 0.8 -points 300 -size 10 -geometry =500x500
150 Give it a few seconds to settle down into a stable clump, and then move
151 the drag the mouse through it to make "waves".
154 This will cause the balls to continue on past the edge of the
155 screen or window. They will still be kept track of and can come back.
158 This will cause the balls to bounce when they get
159 to the edge of the screen or window. This is the default behavior.
162 Imposes a maximum speed (default). If a ball ends up going faster than
163 this, it will be treated as though there were .9 viscosity until it is
164 under the limit. This stops the balls from continually accelerating (which
165 they have a tendency to do), but also causes balls moving very fast to
166 tend to clump in the lower right corner.
169 If this is specified, no maximum speed is set for the balls.
172 Uses the old, simple bouncing algorithm (default). This simply moves any
173 ball that is out of bounds back to a wall and reverses its velocity.
174 This works fine for most cases, but under some circumstances, the
175 simplification can lead to annoying effects.
178 Uses a more intelligent bouncing algorithm. This method actually reflects
179 the balls off the walls until they are within bounds. This can be slow
180 if balls are bouncing a whole lot, perhaps because of -nomaxspeed.
182 .B \-graphmode none | x | y | both | speed
183 For "x", "y", and "both", displays the given velocities of each ball as a
184 bar graph in the same window as the balls. For "speed", displays the total
185 speed of each ball. Default is "none".
189 Display the current frame rate and CPU load.
192 to get the default host and display number.
195 to get the name of a resource file that overrides the global resources
196 stored in the RESOURCE_MANAGER property.
201 Copyright \(co 1992, 1993, 1997 by Jamie Zawinski. Permission to use, copy,
202 modify, distribute, and sell this software and its documentation for any
203 purpose is hereby granted without fee, provided that the above copyright
204 notice appear in all copies and that both that copyright notice and this
205 permission notice appear in supporting documentation. No representations are
206 made about the suitability of this software for any purpose. It is provided
207 "as is" without express or implied warranty.
209 Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
211 Viscosity support by Philip Edward Cutone, III.
213 Walls, speed limit options, new bouncing, graphs, and tail mode fix by
214 Matthew Strait. 31 March 2001