1attraction(6x) XScreenSaver manual attraction(6x)
2
3
4
6 attraction - interactions of opposing forces
7
9 attraction [--display host:display.screen] [--foreground color]
10 [--background color] [--window] [--root] [--window-id number][--mono]
11 [--install] [--visual visual] [--points int] [--threshold int] [--mode
12 balls | lines | polygons | splines | filled-splines | tails ] [--size
13 int] [--segments int] [--delay usecs] [--color-shift int] [--radius
14 int] [--vx int] [--vy int] [--glow] [--noglow] [--orbit] [--viscosity
15 float] [--walls] [--nowalls] [--maxspeed] [--nomaxspeed] [--correct-
16 bounce] [--fast-bounce] [--fps]
17
19 The attraction program has several visually different modes of opera‐
20 tion, all of which are based on the interactions of a set of control
21 points which attract each other up to a certain distance, and then be‐
22 gin to repel each other. The attraction/repulsion is proportional to
23 the distance between any two particles.
24
26 attraction accepts the following options:
27
28 --window
29 Draw on a newly-created window. This is the default.
30
31 --root Draw on the root window.
32
33 --window-id number
34 Draw on the specified window.
35
36 --mono If on a color display, pretend we're on a monochrome display.
37
38 --install
39 Install a private colormap for the window.
40
41 --visual visual
42 Specify which visual to use. Legal values are the name of a
43 visual class, or the id number (decimal or hex) of a specific
44 visual.
45
46 --points integer
47 How many control points should be used, or 0 to select the num‐
48 ber randomly. Default 0. Between 3 and 15 works best.
49
50 --threshold integer
51 The distance (in pixels) from each particle at which the at‐
52 tractive force becomes repulsive. Default 100.
53
54 --mode balls | lines | polygons | tails | splines | filled-splines
55 In balls mode (the default) the control points are drawn as
56 filled circles. The larger the circle, the more massive the
57 particle.
58
59 In lines mode, the control points are connected by straight
60 lines; the effect is something like qix.
61
62 In polygons mode, the control points are connected by straight
63 lines, and filled in. This is most interesting in color.
64
65 In splines mode, a closed spline is interpolated from the con‐
66 trol points.
67
68 In filled-splines mode, the splines are filled in instead of
69 being outlines. This is most interesting in color.
70
71 In tails mode, the path which each particle follows is indi‐
72 cated by a worm-like trail, whose length is controlled by the
73 segments parameter.
74
75 --size integer
76 The size of the balls in pixels, or 0, meaning to select the
77 sizes randomly (the default.) If this is specified, then all
78 balls will be the same size. This option has an effect in all
79 modes, since the ``size'' of the balls controls their mass.
80
81 --segments integer
82 If in lines or polygons mode, how many sets of line segments or
83 polygons should be drawn. Default 500. This has no effect in
84 balls mode. If segments is 0, then no segments will ever be
85 erased (this is only useful in color.)
86
87 --delay microseconds
88 How much of a delay should be introduced between steps of the
89 animation. Default 10000, or about 0.01 seconds.
90
91 --color-shift int
92 If on a color display, the color of the line segments or poly‐
93 gons will cycle through the color map. This specifies how many
94 lines will be drawn before a new color is chosen. (When a
95 small number of colors are available, increasing this value
96 will yield smoother transitions.) Default 3. This has no ef‐
97 fect in balls mode.
98
99 --radius
100 The size in pixels of the circle on which the points are ini‐
101 tially positioned. The default is slightly smaller than the
102 size of the window.
103
104 --glow This is consulted only in balls mode. If this is specified,
105 then the saturation of the colors of the points will vary ac‐
106 cording to their current acceleration. This has the effect
107 that the balls flare brighter when they are reacting to each
108 other most strongly.
109
110 In glow mode, all of the balls will be drawn the same (random)
111 color, modulo the saturation shifts. In non-glow mode, the
112 balls will each be drawn in a random color that doesn't change.
113
114 --noglow
115 Don't do ``glowing.'' This is the default.
116
117 --vx pixels
118
119 --vy pixels
120 Initial velocity of the balls. This has no effect in --orbit
121 mode.
122
123 --orbit Make the initial force on each ball be tangential to the circle
124 on which they are initially placed, with the right velocity to
125 hold them in orbit about each other. After a while, roundoff
126 errors will cause the orbit to decay.
127
128 --vmult float
129 In orbit mode, the initial velocity of the balls is multiplied
130 by this; a number less than 1 will make the balls pull closer
131 together, and a larger number will make them move apart. The
132 default is 0.9, meaning a slight inward pull.
133
134 --viscosity float
135 This sets the viscosity of the hypothetical fluid through which
136 the control points move; the default is 1, meaning no resis‐
137 tance. Values higher than 1 aren't interesting; lower values
138 cause less motion.
139
140 One interesting thing to try is
141
142 attraction -viscosity 0.8 -points 300 \
143 -size 10 -geometry =500x500
144
145 Give it a few seconds to settle down into a stable clump, and
146 then move the drag the mouse through it to make "waves".
147
148 --nowalls
149 This will cause the balls to continue on past the edge of the
150 screen or window. They will still be kept track of and can
151 come back.
152
153 --walls This will cause the balls to bounce when they get to the edge
154 of the screen or window. This is the default behavior.
155
156 --maxspeed
157 Imposes a maximum speed (default). If a ball ends up going
158 faster than this, it will be treated as though there were .9
159 viscosity until it is under the limit. This stops the balls
160 from continually accelerating (which they have a tendency to
161 do), but also causes balls moving very fast to tend to clump in
162 the lower right corner.
163
164 --nomaxspeed
165 If this is specified, no maximum speed is set for the balls.
166
167 --fast-bounce
168 Uses the old, simple bouncing algorithm (default). This simply
169 moves any ball that is out of bounds back to a wall and re‐
170 verses its velocity. This works fine for most cases, but under
171 some circumstances, the simplification can lead to annoying ef‐
172 fects.
173
174 --correct-bounce
175 Uses a more intelligent bouncing algorithm. This method actu‐
176 ally reflects the balls off the walls until they are within
177 bounds. This can be slow if balls are bouncing a whole lot,
178 perhaps because of -nomaxspeed.
179
180 --graphmode none | x | y | both | speed
181 For "x", "y", and "both", displays the given velocities of each
182 ball as a bar graph in the same window as the balls. For
183 "speed", displays the total speed of each ball. Default is
184 "none".
185
186 --fps Display the current frame rate and CPU load.
187
189 DISPLAY to get the default host and display number.
190
191 XENVIRONMENT
192 to get the name of a resource file that overrides the global
193 resources stored in the RESOURCE_MANAGER property.
194
195 XSCREENSAVER_WINDOW
196 The window ID to use with --root.
197
199 X(1), xscreensaver(1)
200
202 Copyright © 1992, 1993, 1997 by Jamie Zawinski. Permission to use,
203 copy, modify, distribute, and sell this software and its documentation
204 for any purpose is hereby granted without fee, provided that the above
205 copyright notice appear in all copies and that both that copyright no‐
206 tice and this permission notice appear in supporting documentation. No
207 representations are made about the suitability of this software for any
208 purpose. It is provided "as is" without express or implied warranty.
209
211 Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
212
213 Viscosity support by Philip Edward Cutone, III.
214
215 Walls, speed limit options, new bouncing, graphs, and tail mode fix by
216 Matthew Strait. 31 March 2001
217
218
219
220X Version 11 6.06-1.fc37 (12-Dec-2022) attraction(6x)