home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
200-299
/
ff256.lzh
/
BlitDemons
/
BlitDemons.doc
< prev
next >
Wrap
Text File
|
1989-10-19
|
3KB
|
58 lines
BlitDemons by Walter Strickler V1.0 10/1/89
This program and all its source code are in the public domain and are
freely distributable and usable for any non-commercial purpose, so long
as I get credit where credit is due.
The following files were originally distributed:
BlitDemons.doc This file.
BlitDemons.doc.info The icon for this file.
BlitDemons The executable.
BlitDemons.info The icon.
bdemon.h The main include file.
bdemon.c The main, self-compiling source.
bdintui.c Intuition stuff.
bdblit.c Blitter stuff.
BDWin.c Produced by PowerWindows.
bdemon.with The 'with' file for Blink.
BDemon.PW2IF PowerWindows v2.0 Int. file.
inclintui.h Includes Intuition.h for BDWin.c
This program is a port of a program by Loren Blaney which runs under
Apex, an unknown Amiga operating system. It is based on the cellular
automaton called 'Demons' described in the August, 1989, issue of Scientific
American.
The algorithm for demons, in case you missed the article, is as follows.
Each pixel on the screen represents a 'cell'. A cell may have any one of
16 values, each one being displayed as a different screen color (actually
this number is arbitrary, but 16 is a good choice). Each cell is set to a
random value. Then, for each generation, if a cell has a value that is one
less than that of any of its 4 orthogonal neighbors, the cell is set to the
value of that neighbor. The values wrap around, so that the value 0 is
considered one greater than 15.
There are four distinct phases. The first phase is the debris phase and
is characterized by the random garbage that is present at the start. The
second phase is the droplet phase, wherein waves of color wash back and
forth across 'droplets'. The third stage is the defect stage. It is
characterized by a few isolated spirals. The spirals that survive are
called demons, and they inhabit the final steady-state phase.
It is not my fault that BlitDemons busy-waits. This is usually inexcusable
in an Amiga program, but it is actually caused by a system routine that
busy-waits: WaitBlit(). It's really a shame, since this program should
require only a small portion of the CPU. As it is, it hogs as much of it as
it can get.
I may be reached at the following addresses:
US Mail: Walter Strickler
1410 19th St #6
Boulder, CO 80302
Ma Bell: (303) 443-0493
BIX: wstrick