home *** CD-ROM | disk | FTP | other *** search
- TransMog
-
- by Glen E. Bredon
-
-
- This download contains the following files:
-
- TransMog - the main BASIC program, a "Cellular automoton".
- TM.Pallets - a variables file used by TransMog and TM.Editor.
- TM.Editor - a BASIC program allowing alteration of the 10 super
- hires pallets used by TransMog.
- SHR - machine language program used by the above.
- SLOAD - ditto.
- TM.Fast - ditto - this is the one that does the work.
- TM.Slow - ditto - same for slow mode.
- TM.Doc - this doc file.
-
- You should copy these files to a directory containing some super hires
- screen images (filetype PIC = $C1), which then can be used by the program.
-
- This is a "cellular automoton" which is fancy language for a program
- having a number of "cells", such as screen pixels, and a rule for changing
- a cell based on its contents and those of its neighbors. The granddad of
- such programs is the "game of life" by Conway. The current program is that
- described in Scientific American Computer recreations, August 1988, and
- called there "the hodgepodge machine."
-
- Each cell has a value of 0 to 120. Value 0 represents a "healthy" cell
- (shown in white in supplied pallets). Value 120 represents an "ill" cell
- (black). Values between represent infected cells (colors). An ill cell
- becomes healthy at the next stage. A healthy cell takes the value
-
- [#infected neighbors/K1] + [#ill neighbors/K2]
-
- An infected cell takes the value
-
- Min([Sum of neighboring values/# infected] + virulence, 120)
-
- Square brackets represent "integer part" of the number contained within.
- In this implementation, I keep the variables K1 and K2 fixed at the values
- 2 and 3 as in the example in that article. The virulence is settable.
- The maximum value for a cell is taken to be 120 rather than 100 as in the
- article. None of that need concern the casual user - this is mainly just
- a program that produces some nice pictures from existing pictures or random
- patterns.
-
- P. Brinkley has written some very nice programs of this type. I wanted
- more speed, a lot of it, and that is the reason for writing this version.
-
- Operation of the program
- ------------------------
-
- After entering the program you are asked whether you want Slow or Fast
- mode. The slow mode operates at about 4 seconds/frame but in full 320x200
- super-hires resolution. Fast mode operates at 1 second/frame but with a
- resolution half of that of slow mode in both directions, 160x100. Fast
- mode also has an option of full screen (with a chunky appearance because
- of the low resolution) or quarter screen. The latter shows 4 stages at
- once, rotating clockwise around the screen, but without the chunkiness of
- the full screen mode.
-
- You are then asked for the virulence which affects the algorithm producing
- the next screen from the present one. A value of 5 to 30 or so is best.
-
- You then select Random or Picture. In the latter case you are given the
- opportunity of choosing from a list of the PIC files in the directory
- containing the program. (There must be at least one such file.)
-
- Then you choose the "masking", High or Low. The program works with an
- array of values for each cell which goes from 0 to 120. Since the graphics
- screen has only 16 values for each pixel, there must be a choice of how the
- 121 possible values of a cell is represented on the screen by the 16 values
- possible on the screen. This is done one of two ways:
-
- 1. Masking off the low bits. This has the effect of nearby values for two
- cells giving the same color on the screen, i.e., of spreading the colors.
-
- 2. Masking off the high bits. This has the effect of giving nearby values
- different colors and cycling the colors when they are used up.
-
- Low masking is preferred in most cases (based on quality of picture produced)
- but High masking is better for random screens with low virulence. The program
- shows the default that is generally best for the parameters chosen.
-
- Commands during operation:
- --------------------------
-
- While the pictures are being generated you can issue several commands:
-
- Keys Effects
- ---- -------
- 0-9 Change to one of the 10 program pallets.
- * Revert to initial pallet (the pictures pallets in picture mode,
- and pallet 0 in random mode).
- H Switch to high masking.
- L Switch to low masking.
- ESC Stop plotting.
-
- After the ESC key, you are given the option of saving the screen. Then
- you are given the option of doing another, of starting over (the only way
- to change the Fast, Slow option), or of quitting.
-
- You should always terminate by the normal ESC key provision. Otherwise
- the memory used by the program may not be released back to the system.
-
- Enjoy!
-