bomb - automatic interactive visual stimulation
Scott Draves <spot@cs.cmu.edu>
http://www.cs.cmu.edu/~spot
ftp://hopeless.mess.cs.cmu.edu/spot/bomb.tar.gz
see the file COPYING for the license covering this software.
see below for the license covering the output of this software.

this program is for svgalib. i use linux, but who knows what else it
will work with.  should be a trivial port to just about anything
(except X, which is so fucking brain damaged that i don't even want to
*start*).  just do a "make bomb", then run it.  use the space bar to
reset, also try z, c. for more commands see the code, and see below.

i apologize for the quality of this code.  it is very low.  i use this
project as a garbage dump for all my worst coding impulses.  this
helps keep the rest of my code cleaner.  no kidding.

chunks of code and various rules have been taken from various sources
(i'm always looking for more stuff, so email if you have something
that you think fits). contributors/sources include:

jepler@herbie.unl.edu  originally derived from vga_eyecandy
tcl@sgi.com            rotor
nix@cs.cmu.edu         wisps, waves, color transitions, many suck/*.gif
Jim Frost              xli header file (copyright below)
Kirk L. Johnson        gif code (copyright below)

thanks to nix for many interesting discussions and hopkins@kaleida.com
for inspiration.  thanks to toffoli and margolus for their excellent
book _cellular automata machines_ (isbn 0-262-20060-0, or see
http://www.im.lcs.mit.edu/cam8)

-----------------------

license covering output:

`bomb' is covered by the GNU GENERAL PUBLIC LICENSE, but as noted on
line 75:

	... the output from the Program is covered only if its
	contents constitute a work based on the Program (independent
	of having been made by running the Program).  Whether that is
	true depends on what the Program does.

in the case of `bomb', the output *is* considered to be derived from
the bomb itself and its datafiles.  i place the following restrictions
on its use:

1) you may not publicly exhibit it.
2) you may not record it.
3) you may not make any money with it.

if you want to do any of these things, contact me, and i'm sure we can
work something out. depending on circumstances, my terms are generally:

1) you must notify me in advance
2) you must give me credit
3) you must give me a cut of any money you make

-----------------------

release 0.20, as of Jul 12 1995
fixed bad scanline bug in multi_rug.  redid many of the kbd controls
so that shift and control are not needed for common controls, more
context sensitive keys in general.  zxcvbn cause events, asdfghjkl;'
switch modes, qwertyuiop[]| pick a parameter to vary, ,.1234567890 and
return vary the parameter.  if you repeated hit a parameter key, it
varies that parameter.  added lissajous and oscilloscope-oid to rotor,
added pens to rotor (draws bsize rects instead of just dots), added
image sequences, rearranged all sorts of image controls, wrote some
sequences.  wrote manual.txt, explaining the ui.  fixed bug in initial
parameters (wasn't setting speed_base).

release 0.19, as of Jun 18 1995
added more images, cropped and tuned existing images.  tracks variance
of pixels in fb, if it's too low, then randomized the fb.  improved
next_contrasting_color, seems ok now.  in auto-mode, reduced chance of
filling.  uses a checkerboard if no images are found in the suck dir.
in rotorug, drift-mode is more likely to be chosen.  added mode-lock
on 'L'.  added rug_multi mode.  more images in the suck dir.  added
title page (need a better one though).  fixed %0 bug in
image_random_tile().  added optional underflow to shade mode.  removed
night-blue-sky and mauve-splat cmaps (too often result in
near-blackness).  split off fast.c from bomb.c, and disabled
optimization of bomb.c.  added blitting image tiles into the heat on
'^I' and into the game board on '^U', '^Y' cycles auto-blit rate.
added speed beat (rate on '}', size on '{').  reads cmaps at runtime.
wrote image2cmap.  fixed uninitialized driver plane bug.

release 0.18, as of May 25 1995
quick-flip auto-mode, redid interpretation of driving function in
brain mode to include asymmetric diffusion kernels, added fuse mode
(still needs work), fixed bug in writing ppm files.  when leaving
modes that operate directly on the fb (eg slip, fuse), pixel values
are interpreted as heat.  bsize made variable.

release 0.17, as of Apr 25 1995
removed contents of dribble directory. added more auto-mode features.
added rhythmic flames.


release 0.16, as of Apr 21 1995
added 'C' (invert driver) '^B' (load random image) 'Z' (combined zx
and ^B), all basically for rug_image mode.  included a bunch of
images. added 'X' = zcm for flame/rotor.  enabled `bent' flame
variation (?).  reads gif files (code taken from xli, see copyright
notices below).  '=' writes current screen into dribble
directory. brain chooses random shift bits, and includes PHASE_ZAP
code to prevent strobing (somewhat effective).  'P' modifies these
shift bits, should build a different sub_brain_table for different
shift bits.  added 'E', 'W', 'R' colormap pulsers.  added 'T' colormap
brightener. added 'Q' which enters auto-mode immediately (instead of
waiting for the time delay), made auto-mode fancier.  added some
variations to slip. '^Q' speeds up auto-mode.  added many gif files to
suck directory.

release 0.15, as of Feb 16 1995
put drift_mode into distrib now that flame is fixed.  removed
mode_life since it was never implemented and was causing a bug.  added
terrible hacks so that random mode can get display images.  smoothed
over transitions.  loading of files less hacked, holds 5 of them in
memory for fast access, 'B' rotates through them.  code really getting
cruddy.  moved rule_rug_image and support into image_rule.c.  included
a ppm file in the release.

release 0.14, as of Feb 15 1995
'R' pulse_gparam (not quite right, i think), suck.ppm replaced by
suck/$(p1).ppm (p1 still under 'o').  new drift modes for flames:
rotation, and none (ie the flame stays still).  bug fix from
bcsaller@mailbox.syr.edu (call vga_init()).  flames finally fixed by
resetting point if it strays outside 1e10.  reads library of flames in
at startup, 'M' sets to p1.

release 0.13, as of Feb 10 1995
'z' no longer resets flame coefs, 'm' does instead.  smooth colormap
transition (though the whole cmap is reset every frame producing
an icky video artifact on my display) from nix.  image mode on 'S'
(reads from suck.ppm on '/') and wispy waves on 'A' from nix.  both of
these are still quite rough.

release 0.12, as of Feb  7 1995
mostly fixed flames.  nice!

release 0.11, as of Feb  7 1995
used most of the brain parameters (p key), handles changing symmetry
more smoothly, brain remaps heat, new compiler flags, flame option in
rotor code (v key) (though still somewhat broken), pulsing (b
key). generalized brain some more (see XXY), though still not
used. twiddled constants, batched flame movement, added drift controls
(\[, - keys).

release 0.10, as of Jan 23 1995
memory maps frame buffer (still usually ignores width/height though),
renamed the whole thing `bomb'.  redid the makefile.

release 0.9, as of Jan 19 1995
kbd commands redone, new rules brain (lots of unused parameters here)
and shade, broke rules into separate files

release 0.8, as of Jan 13 1995
more kbd commands (including simple scripting), bugs fixed

release 0.7, as of Jan 10 1995
keyboard input, life/rug variants are mirrored

release 0.6, as of Jan  3 1995

-----------------------

the following is for gif.h and gif.c

/****
  Copyright 1989, 1990 Kirk L. Johnson

  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. The
  author makes no representations about the suitability of this
  software for any purpose. It is provided "as is" without express
  or implied warranty.

  THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
  OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
****/

the following is for xli-image.h

/*
 * Copyright 1989, 1993 Jim Frost
 *
 * 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.  The author makes no representations
 * about the suitability of this software for any purpose.  It is
 * provided "as is" without express or implied warranty.
 *
 * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
 * USE OR PERFORMANCE OF THIS SOFTWARE.
 */
