home *** CD-ROM | disk | FTP | other *** search
- Dragon
- »»»»»»
- This a growth experiment program. You create a file describing
- the cellular divisions of a creature and can then see it grow on your
- screen ! The algorithm was taken from a Scientific American dating
- four or five years back.
-
-
- Functions
- »»»»»»»»»
- Simply double-click on the icon to start the program. A little
- window will open in a two-colors screen. Here's a rundown of all the
- gadgets and their use:
-
- Load: Opens a requester so you can load a dragon (.drg file).
- Go: Starts the dragon's drawing.
- Stop: Stops the dragon's drawing.
- Clear: Clears the screen.
-
- Day: Number of day of growth.
- X: horizontal starting position (origin is at the left).
- Y: vertical starting position (origin is at the top).
- Cell: which cell to start with (put zero (0) there).
-
-
- Couldn't be easier, right ?
-
-
- How the &^%$@ do I create a .drg file ???
- »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
- Don't panic ! That's easy too, but getting good result is tough.
- The template is:
-
- Number_of_Cell Number_of_Child_per_Cell
-
- X_Move_0 ... X_Move_<Number_of_Cell>
- Y_Move_0 ... Y_Move_<Number_of_Cell>
-
- Cell_0_Child_0 ... Cell_0_Child_<Number_of_Child_per_Cell - 1>
- ...
- ...
- Cell_<Number_of_Cell - 1>_Child_0 ...
- ... Cell_<Number_of_Cell - 1>_Child_<Number_of_Child_per_Cell - 1>
-
- What does it all mean ? First, you give the program the number of
- different cell type and the number of children each cell divides into
- each day. You then give the X and Y movements of each cell. After
- that comes the list of divisions, that is the type of each of the
- children of the cell (from zero (0) upto the number of cell minus one
- (Number_of_Cell - 1)). For example take the followinf file:
-
- 3 2
-
- 2 -2 0
- 1 1 -2
-
- 0 1
- 1 2
- 2 3
-
- This means that the creature has three (3) types of cell and each
- cell divides itself in two cells each day (the original cells dies,
- but that's not important for you). Then comes the list of movements,
- paired vertically for each cell type.
-
- After that we have the cell genetic code for it divisions. We see
- that the cells of type zero (0) divide in two cells of type zero (0)
- and one (1). Note again that cell numbers begin at zero (0), that is
- why the template says `Number_of_cell - 1'.
-
- By specifying how many days the original cell grows, we end up
- with a colony that we then use to plot a line according to the pairs
- of movement. Surprisingly, the right combination of genetic code and
- steps create pleasing graphics, many of them fractals.
-
- That's it ! Each number can be separated by spaces, tabs, commas
- or returns (line-feed).
-
- --
-
- dak@info.polymtl.ca
-
- Pierre Baillargeon
- 11555 Joseph-Boyer
- MontrΘal, QuΘbec, Canada
- H1G 4X6
-
- --
-