The Computational Beauty of Nature
Computer Explorations of Fractals, Chaos,
Complex Systems, and Adaptation


About the Book
  · title page
  · home*
  · cover artwork
  · jacket text
  · table of contents
  · the author*
  · ordering information
Book Contents
  · three themes
  · part synopses
  · selected excerpts
  · all figures from book
  · quotes from book
  · glossary from book
  · bibliography
  · slide show
Source Code
  · overview &
documentation
  · FAQ list*
  · download source code
  · java applets
Miscellany
  · news*
  · reviews & awards
  · errata
  · for educators
  · bibliography (BibTeX format)
  · other links
TERMITES Documentation


 



NAME

       termite - simulate a population of termites


SYNOPSIS

       termite -help
         or
       termite
              [-width  integer]  [-height integer] [-num integer]
              [-dense double] [-steps  integer]  [-seed  integer]
              [-inv] [-mag integer] [-term string]


DESCRIPTION

       Simulate  a  population of termites which do a random walk
       while possibly carrying a wood chip.  Under normal circum-
       stances, the termites will self-organize and move the wood
       chips into piles without a global leader.   The  termites'
       behavior  is  dictated by the following set of rules: If a
       termite is not carrying anything  and  she  bumps  into  a
       chip,  then  she picks it up, reverses direction, and con-
       tinues with the random walk.  If she is  carrying  a  chip
       and  bumps into another, she drops her chip, turns around,
       and starts walking again.  Otherwise, she just does a ran-
       dom walk whether she is carrying a chip or not.


OPTIONS

       -width integer
              Width of the plot in pixels.

       -height integer
              Height of the plot in pixels.

       -num integer
              Number of termites in population.

       -dense double
              Density of chips at start.

       -steps integer
              Number of simulated steps.

       -seed integer
              Random seed for initial state.

       -inv   Invert all colors?

       -mag integer
              Magnification factor.

       -term string
              How to plot points.


MISCELLANY

       The  walking  pattern  of  the  termites is not actually a
       strict random walk.   Instead,  at  each  time  step  they

       randomly  turn  -45, 0, or 45 degrees with equal probabil-
       ity.


BUGS

       No sanity checks are performed to make sure  that  any  of
       the options make sense.


AUTHOR

       Copyright (c) 1997, Gary William Flake.

       Permission  granted  for any use according to the standard
       GNU ``copyleft'' agreement provided that the author's com-
       ments  are  neither  modified nor removed.  No warranty is
       given or implied.

Copyright © Gary William Flake, 1998-2002. All Rights Reserved. Last modified: 30 Nov 2002