logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

glschool - a 3D schooling simulation

Author

       David C. Lambert

X Version 11                                   6.08 (10-Oct-2023)                                   glschool(6x)

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.

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.

Name

       glschool - a 3D schooling simulation

Options

--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.

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

       --root  Draw on the root window.

       --window-idnumber
               Draw on the specified window.

       --delaynumber
               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.

       --nfishnumber
               Number of fish.  Defaults to 100

       --acclimitnumber
               Acceleration limit.  Defaults to 8.0

       --minvelnumber
               Minimum velocity.  Defaults to 1.0

       --maxvelnumber
               Minimum velocity.  Defaults to 7.0

       --goalchgfnumber
               Goal change frequency.  Defaults to 50 (frames)

       --avoidfactnumber
               Avoidance acceleration factor.  Defaults to 1.5

       --matchfactnumber
               Match avg velocity acceleration factor.  Defaults to 0.15

       --centerfactnumber
               School centering acceleration factor.  Defaults to 0.1

       --targetfactnumber
               Target attraction acceleration factor.  Defaults to 80

       --distexpnumber
               Distance weighting exponent.  Defaults to 2.2

       --momentumnumber
               Momentum.  Defaults to 0.9

See Also

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

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]

return

See Also