1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
|
<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>An Interactive Image Generator Issue 18</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center><img alt="BOMB" src="./gx/ayers/bomb_title.gif"></center>
<center>
<H2>An Interactive Image Generator</H2>
<H4>By Larry Ayers,
<a href="mailto:layers@vax2.rainis.net">layers@vax2.rainis.net</a></H4>
</center>
<center><img src="./gx/ayers/line.gif"></center>
<center><h3>Introduction</h3></center>
<p>Last month I wrote about Cthugha, a sound-to-image converter and display
engine. Bomb is another image-generating program, but the sound component is
subsidiary. The images produced have an entirely different character than
those produced by Cthugha. Rather than working with and displaying audio
data, bomb uses a variety of algorithms to generate images. Most of these are
one form or another of artificial life (John Conway's Life is the most
familiar of these), while some others are fractal, reaction-diffusion, or IFS-related.
<p>Bomb is a console Svgalib program, with no X11 version at this time.
<center><h3>Bomb's Images</h3></center>
<p>The output of bomb has a distinctive character, due in large part to the
color palettes used by the program, which are contained in the file
<i>cmap-data</i>. The images have a naturalistic, painting-like character,
with earth-tones predominating. The reason for this is that Scott Draves
generated the palettes using his program <b>image2cmap</b>, which extracts a
representative 256-color palette from an image file. Scott used a variety of
scanned photographs as input. The result is that bomb is strongly marked by
Scott Draves' esthetic preferences.
<p>The format of the <i>cmap-data</i> file is ascii text, with an example
palette's first lines looking like this:<br><code>
<p>
(comment leafy-face)<br>
(cmap<br>
(42 37 33) (31 23 25) (23 19 22) (20 20 24) [etc]
</code>
<p>This is similar to the format of the palette files used by Fractint and
Cthugha; it probably wouldn't be too difficult to convert one format to the other.
<p>The images are displayed full-screen, at 320x200 resolution. This gives
them a somewhat chunky, pixel-ish appearance, and also seems to contribute to the
painting-like quality. Many of the screens are reminiscent of a magnified
view of microorganisms; there is an illusion of opaque, non-human purpose.
<p>Here are a pair of sample bomb screens. The program has a built-in capture
facility with the images saved as <b>ppm</b> files.<br>
<p>
<center><img alt="Bomb Screen #1" src="./gx/ayers/bomb1.gif"></center>
<p>
<center><img alt="Bomb Screen #2" src="./gx/ayers/bomb2.gif"></center>
<hr>
<center><h3>Compilation and/or Installation</h3></center>
<p>The bomb archive file is rather large, over two megabytes; installed the
bomb directory occupies nearly four and one-half mb., which seems like a lot
for a relatively small program. Most of this space is taken up by the
<b>suck</b> subdirectory. <b>Suck</b> contains about 200 <i>TIFF</i> image
files. Some of the bomb modes use these images as seeds. The program will
work fine without these images, so if you're short of disk space they could be
deleted; another approach is to weed through the images and retain just a few
favorites. If examined with an image viewer the <i>TIFF</i> files can be seen
to be mostly basic, small black-and-white images, including large
heavily-serifed single letters and logo-like images from a variety of
cultures. When used as a seed, the image appears nearly full-screen
but is eventually "eaten" by the pullulating AI organisms until it is
unrecognizable.
<p>Another subdirectory, called <strong>dribble</strong>, is where your
screen-captures end up. Each captured <i>PPM</i> image takes up 197 kb., so
it is wise to check the directory from time to time and weed through the captures.
<p>Bomb is rather picky about the versions of the required JPEG and TIFF libs
on your system; they must be compatible with each other in some mysterious
way. Initially I couldn't get it to run at all, but a reinstallation of the
two graphics lib packages (from the same distribution CD, so that
theoretically they would be compatible) cured this. Oddly enough my previous
TIFF and JPEG libs, though updated independently of each other, worked with
other programs which required them. Another argument for staying with a
distribution!
<p>A binary is included in the distribution; the source is there if for some
reason the binary won't work, or if you'd like to modify it.
<p>This program is one of those which is designed to be run from its own
directory; in other words, you just can't move the executable to a pathed
directory and leave the datafiles somewhere else. The easiest way to install
it is to unarchive the package right where you want it to stay. Then when you
want to run bomb, <i>cd</i> to its directory and start it from there.
<center><h3>Controlling the Display</h3></center>
<p>You can get by using bomb just knowing that the spacebar randomizes all
parameters and control-c quits. I found it worthwhile to print out the
section of the readme file which details the various keyboard commands, as
nearly every key does something.
<p>A different mode of keyboard control is enabled by pressing one of the
first four number keys. Scott calls this the "mood organ", and when in this
mode subtle parameters of the currently active display-type can be changed.
In this state the entire keyboard changes parameters within the current mode;
it's completely remapped, and can be returned to the default mode by pressing
the "1" key.
<p>Left to its own devices, bomb periodically randomizes its parameters. Some
combinations of color-map and algorithm are more appealing than others, so
that if it seems stuck in a type of image you don't like, just press the
spacebar and give it a fresh start. Another approach is to key in some
preferred parameters; the display will still randomly change but will remain
within the category selected.
<p>Bomb is the sort of program I like to set running when I'm doing something
else within sight of the computer; if something interesting appears some
tweaking will often nudge the program along a fruitful channel.
<center><h3>Obtaining the Archive</h3></center>
<p>The current version of bomb (version 1.14) can be obtained from
<a href="ftp://sunsite.unc.edu/pub/Linux//apps/graphics/hacks/svgalib/">
Sunsite</a> or from
the <a href="ftp://hopeless.mess.cs.cmu.edu/spot">Bomb Home FTP site</a>.
<center><h3>Is There Any Real Use For Such Programs?</h3></center>
<p>Aside from the obvious real-time entertainment value, programs such as
bomb, cthugha, and xlockmore can serve as grist for the Gimp, the incredible
(but difficult to learn) GNU image-processing tool. Lately I've been
fascinated by the 0.99.9 developer's version of the Gimp. In this release an
image can be saved as a <b>*.pat</b> file, which is a Gimp-specific image
format used most often as flood-fill material. There is a "Patterns" window
which, when invoked, shows thumbnails of all of the <b>*.pat</b> files in the
Gimp pattern directory, including new ones you've dropped in. These are
available for flood-fill if, in the "Tool Options" dialog, <i>patterns</i>
rather than <i>color</i> has been checked. (Don't ask how long it took me to
discover this!) Many of the bomb modes will produce tileable images, which
makes them particularly useful as background fill material. The tricky aspect
of this (as is true with any animated image generator) is capturing the screen
at the right time. All too often the perfect image fleetingly appears (on its
way to /dev/null) and is gone before you can save it.
<p>
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright © 1997, Larry Ayers<BR>
Published in Issue 18 of the Linux Gazette, June 1997</H5></center>
<!--===================================================================-->
<P> <hr> <P>
<A HREF="./lg_toc18.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../lg_frontpage.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./e2compr.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P>
<!--startcut ==========================================================-->
</BODY>
</HTML>
<!--endcut ============================================================-->
|