Contents of the QRULES.DOC file
The new QDRAGON.BAS is written in QuickBASIC to exploit the DRAW
commands and to make data entry less tedious. As I understand
it, only the SCREEN commands must be changed to suit the graphics
adapter available. The LINE commands have been replaced by DRAW
commands to permit drawing cells that are more exotic than simple
line segments. The default is a line segment drawn in a
direction determined by the cell label number. The length of the
line segment is determined by scale factor held in the "cell
length" variable. If something else is desired, you must type
in the appropriate sequence of DRAW commands. Such a sequence
will be sized by the value in the "cell length" variable. The
program displays the DRAW commands it will use.
QDRAGON.BAS improves on the user interface but is not yet ideal.
It pretends it knows what you want as data and displays what it
will use if you don't enter any data. Pressing Return repeatedly
will show currently recorded data and how the program wants the
data typed in. Pressing F1 at any time will draw the dragon
determined by current data. The program always has complete data
to draw some dragon. To enter data for a new dragon, simply
enter the data requested followed by Return. To back up and
change or view previously requested data, end entry with a ].
The first thing the program wants to know is if you want a dragon
stored on disk. Pressing Return or ] ignores this request and
displays the next, or previous, thing it wants. Otherwise you
type in the name of a dragon stored on disk followed by Return or
], or F1 if you want the program to draw the dragon you have
named. Dragons stored on disk contain *all* the data required by
the program, including positioning on the screen and the birth
cell list. Hence loading a dragon from disk can be followed
immediately by F1 which will draw it on the screen.
The next thing the program wants is the number of directions.
This request is the number of cell orientations. Entering the
number 4 means all cells are oriented in four directions, east,
north, west, or south, as if reading a map. The program assumes
that all cells are single line segments oriented in one of four
directions unless told otherwise by you or the input file. In
any case the program will display the DRAW commands it will use.
Entering the DRAW commands wanted (followed by Return, ], or F1)
changes the default value. Pressing ] following data entry
displays what the program thinks you typed.
Following the number of directions request, QDRAGON.BAS wants the
maximum cell division. This is so that the program can begin to
dimension the genetic code array. You type in this value if it
differs from the displayed value (Return cycles forward through
data entry). The genetic code requires two dimensions; so if F1
is pressed now, all entries in the genetic code array will be
zero, producing a dull dragon. The program redimensions the
genetic code array whenever one of its dimensions is changed.
Next, the program wants the total number of cell types. This
number completes the dimension of the genetic code array. The
program displays, as always, what it thinks should be the number
of cell types. Typing Return accepts the program's choice and
displays what the program wants next and the value it will use if
you don't change it.
After typing Return, the program displays the DRAW commands it
will execute for the first cell. You should type Return to go on
to the next program request or type in the DRAW commands you want
for the first cell followed by Return to advance to the next
request or ] to edit or preview the previous request. If you
want a cell to be an invisible line segment, typing a dash will
cause the program to record the appropriate DRAW commands, and if
you want a 'do nothing' cell, typing * makes the program fill in
DRAW commands that do the job.
Ending the entry with Return, the program will now exhibit the
label of the first child of the first cell. Each cell divides
into a number of cells, numbered from one to the number of cells
into which the cell divides. A user entry here should be a cell
label, a number between 0 and one less than the total number of
cells. Typing Return causes the program to ask for the next
child of the current cell. If the cell has fewer children than
the maximum, the last child cell should be followed by a period.
Whenever the program asks you for the last child of a cell
labelled a multiple of the number of directions, it permits you
to end entry with an * to abort this feature. Without the *
entry, the program will fill in child cells cyclically up to the
next cell labelled a multiple of the number of directions, and
display the draw code for the next cell which is a multiple of
the number of directions.
After all cells and their children have been displayed, the
program requests the number of cells in the birth cell list.
Dragons can begin life as a single cell (number of cells in birth
cell list, 1) or as several cells, each drawn in a different
color. Next the dragon's age in days is requested. Following
this comes a request for cell length and the position on the
screen where drawing is to begin. The program draws the dragon
starting at this position.
Finally, the program asks if the dragon just drawn is to be saved
on disk. If so, you type a name of up to 8 letters followed by
Return or ]. Only Ctrl-Break or illegal data entry ends the
QDRAGON.BAS displays DRAW commands instead of numbers; so ignore
interpreter values in the table. The relation between
interpreter values in the table and the draw codes in the program
is I->TA360I/DR. Invisible cells end in BR and 'do nothing'
cells end in NBR.
Have a good time exploring fractals. I have.