attraction(6)
π attraction(6) β the XScreenSaver manual, but make it group chat π
okay so bestie, you're reading the attraction(6) page from the XScreenSaver manual and honestly? it's giving physics but make it cute. let's get into it π«Ά
β¨ NAME β¨
attraction β literally just interactions of opposing forces, no cap πΈ
π SYNOPSIS π
attraction [--display host:display.screen] [--foreground color]
[--background color] [--window] [--root] [--window-id number][--mono]
[--install] [--visual visual] [--points int] [--threshold int] [--mode
balls | lines | polygons | splines | filled-splines | tails ] [--size
int] [--segments int] [--delay usecs] [--color-shift int] [--radius int]
[--vx int] [--vy int] [--glow] [--noglow] [--orbit] [--viscosity float]
[--walls] [--nowalls] [--maxspeed] [--nomaxspeed] [--correct-bounce]
[--fast-bounce] [--fps]
π¦ DESCRIPTION π¦
okay so attraction has several visually different modes of operation, and every single one of them is built on the same iconic premise: a set of control points that attract each other up to a certain distance, and then start repelling each other. enemies to lovers, but particles π
the attraction/repulsion is proportional to the distance between any two particles. that's it, that's the whole vibe check.
β¨ OPTIONS β¨
attraction accepts the following options, and yes we're going through all of them, grab a strawberry π
--windowβ Draw on a newly-created window. This is the default, so like, you're already doing it.--rootβ Draw on the root window.--window-idnumber β Draw on the specified window.--monoβ If you're on a color display, pretend we're on a monochrome display. delusion as a feature π--installβ Install a private colormap for the window.--visualvisual β Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual.--pointsinteger β How many control points should be used, or0to select the number randomly. Default0. Between3and15works best β that's the sweet spot, iykyk.--thresholdinteger β The distance (in pixels) from each particle at which the attractive force becomes repulsive. Default100. so close yet so far π₯--mode balls | lines | polygons | tails | splines | filled-splinesβ the main character choice, ok. here's the tea:- In balls mode (the default) the control points are drawn as filled circles. The larger the circle, the more massive the particle.
- In lines mode, the control points are connected by straight lines; the effect is something like
qix. - In polygons mode, the control points are connected by straight lines, and filled in. This is most interesting in color.
- In splines mode, a closed spline is interpolated from the control points.
- In filled-splines mode, the splines are filled in instead of being outlines. This is most interesting in color.
- In tails mode, the path which each particle follows is indicated by a worm-like trail, whose length is controlled by the
segmentsparameter. worm. like. literally a worm πͺ±
--sizeinteger β The size of the balls in pixels, or0, meaning to select the sizes randomly (the default.) If this is specified, then all balls will be the same size. This option has an effect in all modes, since the "size" of the balls controls their mass. so it's not just a looks thing, it's a physics thing π--segmentsinteger β If inlinesorpolygonsmode, how many sets of line segments or polygons should be drawn. Default500. This has no effect inballsmode. Ifsegmentsis0, then no segments will ever be erased (this is only useful in color.)--delaymicroseconds β How much of a delay should be introduced between steps of the animation. Default10000, or about0.01seconds. tiny little pause. a lil breather β¨--color-shiftint β If on a color display, the color of the line segments or polygons will cycle through the color map. This specifies how many lines will be drawn before a new color is chosen. (When a small number of colors are available, increasing this value will yield smoother transitions.) Default3. This has no effect inballsmode.--radiusβ The size in pixels of the circle on which the points are initially positioned. The default is slightly smaller than the size of the window.--glowβ This is consulted only inballsmode. If this is specified, then the saturation of the colors of the points will vary according to their current acceleration. This has the effect that the balls flare brighter when they are reacting to each other most strongly. drama? yes. gorgeous? also yes π₯- In glow mode, all of the balls will be drawn the same (random) color, modulo the saturation shifts. In non-glow mode, the balls will each be drawn in a random color that doesn't change.
--noglowβ Don't do "glowing." This is the default. (bestie said no glow today π)--vxpixels,--vypixels β Initial velocity of the balls. This has no effect in--orbitmode.--orbitβ Make the initial force on each ball be tangential to the circle on which they are initially placed, with the right velocity to hold them in orbit about each other. After a while, roundoff errors will cause the orbit to decay. it's giving doomed romance π--vmultfloat β Inorbitmode, the initial velocity of the balls is multiplied by this; a number less than1will make the balls pull closer together, and a larger number will make them move apart. The default is0.9, meaning a slight inward pull.--viscosityfloat β This sets the viscosity of the hypothetical fluid through which the control points move; the default is1, meaning no resistance. Values higher than1aren't interesting; lower values cause less motion.
One interesting thing to try is
attraction -viscosity 0.8 -points 300 \
-size 10 -geometry =500x500
Give it a few seconds to settle down into a stable clump, and then move the drag the mouse through it to make "waves". (yes, "move the drag the mouse" β that's what the manual says, we don't edit the lore π)
--nowallsβ This will cause the balls to continue on past the edge of the screen or window. They will still be kept track of and can come back. they're just going on a lil walk, they'll be back π¦--wallsβ This will cause the balls to bounce when they get to the edge of the screen or window. This is the default behavior.--maxspeedβ Imposes a maximum speed (default). If a ball ends up going faster than this, it will be treated as though there were.9viscosity until it is under the limit. This stops the balls from continually accelerating (which they have a tendency to do), but also causes balls moving very fast to tend to clump in the lower right corner. the lower right corner is the group hang spot, apparently π--nomaxspeedβ If this is specified, no maximum speed is set for the balls.--fast-bounceβ Uses the old, simple bouncing algorithm (default). This simply moves any ball that is out of bounds back to a wall and reverses its velocity. This works fine for most cases, but under some circumstances, the simplification can lead to annoying effects.--correct-bounceβ Uses a more intelligent bouncing algorithm. This method actually reflects the balls off the walls until they are within bounds. This can be slow if balls are bouncing a whole lot, perhaps because of-nomaxspeed.--graphmode none | x | y | both | speedβ For"x","y", and"both", displays the given velocities of each ball as a bar graph in the same window as the balls. For"speed", displays the total speed of each ball. Default is"none". data girlies rise π--fpsβ Display the current frame rate and CPU load.
πΈ ENVIRONMENT πΈ
DISPLAYβ to get the default host and display number.XENVIRONMENTβ to get the name of a resource file that overrides the global resources stored in theRESOURCE_MANAGERproperty.XSCREENSAVER_WINDOWβ The window ID to use with--root.
π SEE ALSO π
X(1), xscreensaver(1) β go read those too, bestie, they're the whole ecosystem π§
π COPYRIGHT π
Copyright Β© 1992, 1993, 1997 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
fr fr on the "as is" part β no warranty, express or implied, periodt.
β AUTHOR β
Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
Viscosity support by Philip Edward Cutone, III.
Walls, speed limit options, new bouncing, graphs, and tail mode fix by Matthew Strait. 31 March 2001
okay so that's the whole page, you ate that π
and like β the actual version you're looking at is X Version 11, 6.15, dated 30-Mar-2026, so go forth and make pretty particles collide, love u byeee πβ¨ππ¦πΈ
π¦ where this page comes from
- alpine 3.24: xscreensaver-doc 6.15-r0 Β· GPL-2.0-or-later GPL-3.0-or-later 0BSD MIT
- arch rolling: xscreensaver 6.15-1 Β· LicenseRef-XScreenSaver
- nixpkgs unstable: xscreensaver 6.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms