These Fractal demos compliment Eric Giguere's fractal article. They can all be run by double-clicking on their icons and can be exited by clicking the close gadget in the upper left corner of the screen. Chaos by Eric Giguere This program follows the algorithm described in the article as "the Chaos Game", using random points to create a "Sierpinski Triangle". The program will run as long as you want, slowly filling in empty spaces in the pattern. Since the points are filled at random, the pattern fills inefficiently; as more points are drawn, there is a greater likelyhood that the next point will fall on a point which is already lit. This program uses random points following a simple rule to make a "self-similar" object, a fascinating contrast is the "TriTree" fractal drawn by the PolyFrac program. This duplicates the Sierpinski triangle (more or less) using an explicitly self-similar algorithm, and is much faster as a result. Fractal ferns and other replications of natural objects use a reverse of the PolyFrac technique which is known as the "collage theorem": one draws a small pattern and tries to fit different sizes of that pattern onto the object that is to be reproduced. When a pattern is found which matches the object pretty well on several scales, it is used as the "generator" for the picture of the object. When real ferns grow, they use a chaos game type method where random factors influence the growth of each cell and leaf, but simple governing rules cause the outcome to be a familiar fern pattern. GBMan by Eric Giguere Gingerbread Man  Say you have two arrays of points, call them x and y. The first element in each array is set to some (real) pre-defined value between -1 and 1 and the remaining elements are defined by the equations; x[ n ] = 1 - y[ n-1 ] + | x[ n-1 ] | y[ n ] = x[ n-1 ] In this formula, x[ n-1 ] means the absolute (unsigned) value of the array element x[ n-1 ]. Plot a point at each location ( x[ n ], y[ n ] ) on a piece of graph paper. This is what the GBMan program does. (The default starting position is (-0.10051202, 0.00). Alter the starting point slightly and the picture changes, sometimes dramatically. This is known as the "butterfly effect", or sensitive dependence on initial conditions. Small changes in initial conditions lead to large differences later on. GBMan can be run from the CLI with optional arguments specifying the starting point. Just type GBMan X Y where X and Y are the starting points. I modified Eric's code to accept different starting positions, expecting exciting new pictures, I was disappointed. I didn't experiment too much, so maybe there are exciting other pictures to make... Henon Not all equations create such arresting images. Consider the Henon Map, given by the equations: x[ n ] = 1 + y[ n-1 ] - 1.4 * x[ n-1 ] * x[ n-1 ] y[ n ] = 0.3 * x[ n ] with a default starting point of (-1.00, 0.00), While not as impressive as the gingerbread man, the Henon Map demonstrates another fractal phenomenon -- the strange attractor, a set of points which seems to "attract" all other points. The strange attractor is a well-documented, but not well-understood mathematical phenomenon. Henon can also be run from the CLI with optional arguments specifying the starting point. Just type: Henon X Y where X and Y are the starting points. This also proved rather disappointing for the few values I tried, but I encourage everyone to try it out. People with C compilers can also change the other parameters to see what happens. Julia by Eric Giguere Make sure you have the file mathtrans.library in your LIBS: directory before running Julia or either of the Mandelbrot programs. The Julia (Julia-Fatou) set is closely related to the Mandelbrot set; for every point in the Mandelbrot set, there is an entire Julia set picture representing two other variables. CLI arguments can be used with this program. The default starting position is (-1.0 , 0.0). The best results obtain when the X coordinate is negative. Mandelbrot and Mandelbrot32 by Eric Giguere These two programs draw the Mandelbrot set. The color at each point in the plane is determined by the number of times the process Z -> Z*Z + Z can be repeated before Z ( which is X + i*Y ) goes above or below a certain limit (which determines whether it is in the Mandelbrot set or not). These programs can take a long time to finish. Mandelbrot32 is a version of Mandelbrot which opens a 32-color screen rather than a 16-color interlaced screen like Mandelbrot. Dragon, Hilbert, PolyFrac by Daniel Wolf Ph.D. These three programs build self-similar fractal drawings. The basic scenario goes like this -- a straight line segment (the "initiator") is replaced by a certain shape (the "generator"). This shape is actually the first picture drawn by these programs. The computer then replaces each line segment in the generator with a smaller version of the entire generator. This process is repeated until the next level becomes too small to see. Dragon and Hilbert are optimized, stand-alone versions of the dragon and Hilbert curves drawn by PolyFrac. These three programs are capable of checking whether the Workbench screen is interlaced, to determine how many levels of recursion to use. PolyFrac is provided courtesy of COMPUTE! Books. Source code for PolyFrac can be found in "COMPUTE!'s Amiga Machine Language Programming Guide" by Daniel Wolf and Douglas Leavitt, copyright 1988 by COMPUTE! Books. The source code for the above programs is in the FractalSource subdirectory of the Programming drawer. StrangeTraj, AttractorTime by Arnie Cachelin (me!) These two programs model and display the dynamics of a system of non-linear differential equations which exhibit chaotic behavior. This behavior can be viewed in a graph showing the system's "phase-space trajectory." This trajectory shows an "attractor" where the system seems to spiral in toward a final position. Since the system erratically jumbs between attractors, without ever stopping in the center, it is called a "strange attractor". This system has three variables or dimensions in phase-space: X, Y, and Z. Chaotic systems demonstrate "sensitive dependence on initial conditions" which means that two identical systems with slightly different starting positions will soon have totally different trajectories. These programs can be run from the Workbench or from CLI with optional arguments to specify the initial position (in 3-D) and the number of time steps to go through, for example type: AttractorTime 1 1 .5 4000 to start the evolution at the point (1,1,0.5) and step through 4000 time steps. StrangeTraj, shows the trajectories characteristic of a strange attractor in three windows which give three different perspectives. The other program, AttractorTime, shows the X, Y and Z positions versus time. Notice the regular oscillations punctuated with irregular jumps. Try varying the starting conditions by a little bit and see how soon the trajectories differ. Although the tangled spirals will look the same after a long time, the order in which they are filled is different and pictures drawn with only a few hundred steps should differ considerably.