Reference

glschool(6x)

a 3D schooling simulation

NAME

glschool - a 3D schooling simulation

SYNOPSIS

glschool [--display host:display.screen] [--visual visual] [--window] [--root] [--window-id number] [--wireframe] [--fps] [--delay number] [--nfish number] [--maxvel number] [--minvel number] [--acclimit number] [--avoidfact number] [--matchfact number] [--centerfact number] [--targetfact number] [--minradius number] [--momentum number] [--distexp number] [--goalchgf number] [--fog] [--drawgoal] [--drawbbox]

DESCRIPTION

Uses the Craig Reynolds Boids algorithm to simulate a 3D school of fish. This is a lightly modified version of the algorithm that supports goal attraction.

Many different behaviors are possible by tweaking the parameters. No sanity checking is performed on the command line params, so if you want to use negative accelerations or minimum velocity that is larger than maximum velocity or that sort of thing, the simulation will try to digest it.

It looks best with the highest number of fish that will give you an FPS of > 25 or so.

OPTIONS

--visual visual

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.

--window

Draw on a newly-created window. This is the default.

--root

Draw on the root window.

--window-id number

Draw on the specified window.

--delay number

Per-frame delay, in microseconds. Default: 20000 (0.020 seconds.).

--wireframe | --no-wireframe

Render in wireframe instead of solid.

--fps

Display the current frame rate, CPU load, and polygon count.

--fog | --no-fog

Whether to show foggy (cloudy) water.

--drawgoal | --no-drawgoal

Whether to show the school's attraction goal.

--drawbbox | --no-drawbbox

Whether to show the bounding box.

--fog | --no-fog

Whether to show foggy (cloudy) water.

--nfish number

Number of fish. Defaults to 100

--acclimit number

Acceleration limit. Defaults to 8.0

--minvel number

Minimum velocity. Defaults to 1.0

--maxvel number

Minimum velocity. Defaults to 7.0

--goalchgf number

Goal change frequency. Defaults to 50 (frames)

--avoidfact number

Avoidance acceleration factor. Defaults to 1.5

--matchfact number

Match avg velocity acceleration factor. Defaults to 0.15

--centerfact number

School centering acceleration factor. Defaults to 0.1

--targetfact number

Target attraction acceleration factor. Defaults to 80

--distexp number

Distance weighting exponent. Defaults to 2.2

--momentum number

Momentum. Defaults to 0.9

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 the RESOURCE_MANAGER property.

XSCREENSAVER_WINDOW

The window ID to use with --root.

SEE ALSO

X(1), xscreensaver(1),
https://www.red3d.com/cwr/boids

COPYRIGHT

Copyright © 2005-2006 by David C. Lambert. 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.

AUTHOR

David C. Lambert

History

--acclimit since Debian 12 (Bookworm); --avoidfact since Debian 12 (Bookworm); --centerfact since Debian 12 (Bookworm); --delay since Debian 12 (Bookworm); --distexp since Debian 12 (Bookworm); --drawbbox since Debian 12 (Bookworm); --drawgoal since Debian 12 (Bookworm); --fog since Debian 12 (Bookworm); --fps since Debian 12 (Bookworm); --goalchgf since Debian 12 (Bookworm); --matchfact since Debian 12 (Bookworm); --maxvel since Debian 12 (Bookworm); --minvel since Debian 12 (Bookworm); --momentum since Debian 12 (Bookworm); --nfish since Debian 12 (Bookworm); --no-drawbbox since Debian 12 (Bookworm); --no-drawgoal since Debian 12 (Bookworm); --no-fog since Debian 12 (Bookworm); --no-wireframe since Debian 12 (Bookworm); --root since Debian 12 (Bookworm); --targetfact since Debian 12 (Bookworm); --visual since Debian 12 (Bookworm); --window since Debian 12 (Bookworm); --window-id since Debian 12 (Bookworm); --wireframe since Debian 12 (Bookworm).

-acclimit until Debian 11 (Bullseye); -avoidfact until Debian 11 (Bullseye); -centerfact until Debian 11 (Bullseye); -delay until Debian 11 (Bullseye); -distexp until Debian 11 (Bullseye); -drawbbox until Debian 11 (Bullseye); -drawgoal until Debian 11 (Bullseye); -fog until Debian 11 (Bullseye); -fps until Debian 11 (Bullseye); -goalchgf until Debian 11 (Bullseye); -matchfact until Debian 11 (Bullseye); -maxvel until Debian 11 (Bullseye); -minvel until Debian 11 (Bullseye); -momentum until Debian 11 (Bullseye); -nfish until Debian 11 (Bullseye); -no-drawbbox until Debian 11 (Bullseye); -no-drawgoal until Debian 11 (Bullseye); -no-fog until Debian 11 (Bullseye); -no-fps until Debian 5.0 (Lenny); -no-wireframe until Debian 11 (Bullseye); -root until Debian 11 (Bullseye); -targetfact until Debian 11 (Bullseye); -visual until Debian 11 (Bullseye); -window until Debian 11 (Bullseye); -wireframe until Debian 11 (Bullseye).