spore

Calculate and display an aggregating particle

Authored and Contributed by
Ronald Joe Record
Restrictions
Copyright 1993, 1994 Ronald Joe Record
Availability
The mathrec source code is freely redistributable. The author maintains binary distributions for Caldera OpenLinux 3.1, OpenServer, UnixWare 7 and Open UNIX 8. These distributions and the source code are available via:

Binary Distributions
OpenLinux/Open UNIX ftp://ftp2.sco.com/pub/.../RPMS/mathrec-1.1c-1col.i586.rpm (no longer available)
UnixWare 7 ftp://ftp2.sco.com/pub/skunkware/uw7/Packages/mathrec-1.1b.pkg
OpenServer ftp://ftp2.sco.com/pub/skunkware/osr5/vols/mathrec-1.1c-VOLS.tar

Source Code Distributions
Source RPM ftp://ftp2.sco.com/pub/.../SRPMS/mathrec-1.1c-1col.src.rpm (no longer available)
Gzip'd tar archive ftp://ftp2.sco.com/pub/skunkware/src/x11/misc/mathrec-1.1c.tar.gz

Description
The idea here is to calculate and display an aggregating particle. In order to accomplish this, a modified random walk algorithm is used. Initial spore(s) are randomly "seeded" in the center quarter of the screen. Subsequent "spores" randomly enter a rectangular neighborhood of a seed and "randomly walk" toward the seed. When within a pixel of a previously existing spore, the new spore "sticks". I called the program "spore" because of the similar look to a mushroom spore print.

The colors in the image represent the "age" of spores. After N spores have been "stuck", the color index is incremented.

Acknowledgements
The algorithm was derived from lectures given by Dietmar Saupe at the University of California at Santa Cruz. Assistance with colormaps and spinning color wheels and X was gleaned from Hiram Clawson and Stacey Campbell.
Build
To build the spore binary, either use the Imakefile or the sample makefile, Makefile.std. If your system doesn't support prototypes, uncomment the PROTODEFINE line of the Imakefile.

After modifying the Imakefile appropriately, either use "xmkmf" or "imake" to create a Makefile. Then just type "make" to compile spore.

The manual page can be formatted by typing "nroff -man spore.man > spore.1".

Install
To install spore, copy the spore binary to the desired location (the sample makefile puts it in /usr/local/bin) Copy the formatted man page to wherever you keep your local doc (i use /usr/local/man/cat1 for imaging software), then add that location to your MANPATH.
Productivity
None
Safety
I have used this for years without harm.
Work Planned
None
Documentation
manual page.
Verification
You can test spore by just invoking it with no arguments. It should display a 512x480 image. Some workstations may be slow to calculate and display a map as there are lots of calculations involved.

Some "interesting" ways to run spore are as follows :
% spore -F -n 10 -d
(use the full screen, calculate 10 maps in demo mode)
% spore -R
(display on the root window)
% spore -o sporeprint.ppm
(calculate and display with default parameters and save the resulting image as a PPM file called sporeprint.ppm. this can be viewed later using xv or any PPM viewing utility)

Feedback
Ideas, comments, additions, deletions, suggestions, bug reports, code review,... e-mail Ronald Record at rr@ronrecord.com