Fractals Modules

Fractal Module Documentation by composer Warren Burt, PhD., www.tropicapricorn.com

Lorenz Pickover Martin Hopalong Hilbert Henon IFS6Dim

1dCA3 1dCA4 1dCA5 2dLife


ArtWonk fractal modules are intended to be used as sources for both sound and graphics. Each tick produces an iteration of the fractal generator, and the outputs are available as floating point values, which can be scaled with the Math/Scale module.

Some programs give you a pre-composed set of mappings for Fractals into musical or visual parameters. With ArtWonk, since it's a construction kit for you to realize your own idea, just the raw fractals are given to you. It's up to the user to decide how the fractals will be used. However, each fractal has ranges for its parameters within which it gives you the best results. These are discussed in the notes below. Note that each output of the fractal produces an output that will be between varying number limits. In using them, you'll have to first observe the fractal in operation for a while, seeing what the limits of the output you want to use are, and then use either a Scale or a Bounds or a Mod or a Range module to put it within the limits you want. For example, to apply a fractal to a 640 x 480 pixel pallette, first determine the range of the output. If it goes negative, use an Add module to offset it so that the output of the Add is all positive. Then use a Scale to scale the output from whatever it is up to 640, 480 or whatever range you need. Many of the example files for the fractals do this kind of mapping of a fractal to a graphic. You'll find many helpful hints for mapping your fractal output to a useable range in them.

When used as a graphics source, the module should be put into a Loop macro. A loop count of 500-2000 will provide full screen graphics in a single tick cycle.


Hopalong

The Hopalong Fractal is a good one to start with. It's almost impossible to overload this equation. It will take just about any inputs you put into its A, B and C inputs - I've tried everything from -5000 to 5000 in the inputs, and a more or less interesting result almost always happens. The trick, though is in scaling the output to get a useful result. Set your A B and C parameters to the numbers you want to start with. Have the "reset" on the System module going into the "Reset" input on the Hopalong fractal module. Start your Clock (going into the "Chng" input on the Hopalong module) running. Observe the outputs of the X and Y outputs. Let it run for a while, so you see the biggest value that appears in the X and Y outputs. This is usually somewhat less than three times the biggest value you have in any of the A, B or C inputs.

Put the output of the X and Y outputs into an Add module. Add a number about 3 (or even 4) times your largest value in any of the A B or C inputs to the X and Y outputs. Place the output of the Adders into Scale modules. Have the "From" input in the Scalars set to 2x the amount you added in the Adder modules. The "To" value in the Scalars should be the range you want your output to be over - for example 640 for video pixels, or 48 for pitches (for a 4 octave range). The chart below should make things clear.

Largest value in A,B or C Value to Add "From" Value in Scaler
5000 15000 30000
0.5 1.5 3
20 60 120

Remember, these are approximate values. If you find you're getting values out of range, increase the values in the Adder and the "From" Values in the Scaler.

Outputs:

Iter: Iteration since last reset.

X: X point for current iteration.

Y: Y point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

iA-iC: Initialization constants. Try different values to change the fractal behaviour.


Lorenz

The Lorenz Fractal is trickier to handle than the Hopalong. This is because it can exhibit a wide variety of behaviours, depending on its settings. Basically, there are three kinds of behaviours:
1) The outputs can zoom off to infinity (and crash ArtWonk or MusicWonk)
2) The outputs can go into a loop and spiral down into endless repetition
3) The outputs can go into orbit around two different regions (attractors) with more or less constantly changing orbital shapes.

The last behaviour is the desired one - as it gives a constant stream of different values to deal with - values which have some measure of repetition in them, but also a lot of variety.

The module starts up with these values for its four inputs:
A - 10
B - 2.666667
C - 28
D - 0.01

Leaving the other three values at their starting value, you can change each separate remaining value between these ranges before either the equation zooms off to infinity, or spirals down to repetition of a single value:

A 3.199 -> 12
B .5 -> 8
C 15.5 -> 64 (but beware of higher values in the outputs at values above 40 in this parameter)
D 0.001 - 0.02

Since these values are all interlinked, you'll find that the output of the equation changes with two variables changing at once. Put all 4 variables near the top of their range, and the equation will almost certainly zoom off to infinity. Similarly, putting them all near their bottoms is almost guaranteed to send it off into a downward spiraling loop.

For example, setting B to 8.3, with the other values at their starting points will just send the equation spiraling down a loop. But when B = 8.3, and the other values are set like this:
A = 40; B = 8.3; C = 28, D = 0.02; the result is a quite attractive fractal. Experimentation is the only way to explore the full range of possible Lorenz fractals.

In the example patch, "Lorenz Explorer.awp," you'll notice that X and Y outputs of the Lorenz are used, 35 is added to both outputs, and then the outputs of the Add modules are Scaled from a range of 70 into the appropriate graphics ranges. Using a different combination of X Y and Z outputs, and different amounts of Add and Scale will create different sizes and kinds of graphics.

Outputs:

Iter: Iteration since last reset.

X: X point for current iteration.

Y: Y point for current iteration.

Z: Z point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

iA-iD: Initialization constants. Try different values to change the fractal behaviour.


Pickover

This is a fractal module that it's almost impossible to overload. Ranges for the parameters are
at least
A -3200 to +3200
B -50 to + 50
C -600 to +600
D -250 to +250

However, if you go outside a very narrow range of values near the middle of these ranges, most of
what you get, visually or sonically, will be pretty close to (un)equally weighted noise.

To get the really fine grained complex structures that the Pickover fractal is capable of,
one has to stick fairly close to the starting values.

A = 2
B = 0.5
C = -0.63
D = -2.5

If you leave the other three values alone, and change just the one remaining value, the ranges that
fine-grained structures emerge within are approximately

A = 1 to 3 (or -1 to -3)
B = 0.1 to 1.5 (or -0.1 to 1.5)
C = -0.1 to -1.2 (or 0.1 to 1.2
D = -2.4 to -3 (or 2.4 to 3)

But be aware that within these ranges are "dead zones," where certain values will send the fractal
spiraling down into repeating one value, or looping through a few values. Some of these "dead zones"
are

A around 1.6
C -1.40 to -1.55
D 0.5 to 2.3 and 3.7 to 4.4

Other ranges which produce either fine-grained structures, or which send the fractal spiraling down into repetition remain to be found.

The example file "Pickover Loop Tester.awp" will allow you to explore a wide range of values with this fractal rapidly. Each "frame" consists of 1000 interations of the fractal, so you can see how it builds up into structures rapidly.

Outputs:

Iter: Iteration since last reset.

X: X point for current iteration.

Y: Y point for current iteration.

Z: Z point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

iA-iD: Initialization constants. Try different values to change the fractal behaviour.


Martin

The Martin fractal is interesting because it just keeps growing. That is, over large numbers of iterations, the range of its outputs keeps increasing and increasing. These increases, however, usually don't happen for a while, then suddenly occur. For example, when mapping the fractal to a 640 x 480 graphic, with starting values of A=10; B= 11; C = 6; and D = 0.6, for the first 10,000 iterations, the diagram is fairly small, and stays in the middle of the picture, only covering about 1/3 of the picture area. After 10,000 iterations it suddenly expands to cover about 1/2 the picture. By 30,000 iterations, it has jumped again, now covering the entire picture. By 65,000 iterations it has expanded beyond the bounds of the picture plane. Input C seems to be the parameter that most controls this expansion, but its behaviour is not really linear. For example, with A = 10; B = 11; and D = 0.4; with C = 1, the picture stays very small, but does expand within tight limits. For C = 3 the image expands beyond the picture plane by 100,000 iterations, but for C = 4.3, the picture seems to stay at about 1/2 the picture size. Experimentation is the best way to explore this fractal.

The starting values of the module are A = 10; B = 11; C = 2; and D = 0.4. Leaving any 3 of these parameters at these starting values, and just varying one of them, the following ranges were found to work. Ranges beyond these might also work, but they haven't been explored.

A can vary between 0.01 and 50. Larger values of A seem to expand the diagram and move it off one corner of the picture area, but may still be useful.
B can vary from 0.01 to 100, and maybe further.
C can vary from 0.01 to 100. A value of 1000 was also tried and seemed to work. At C = 100 very elaborate and finely detailed patterns were produced.
D can vary from .1 to .69. From 0.01 - .1 a pattern of just small circles in a square was produced. At settings of .7 and .8 only one figure 8 from the overall fractal was seen. This seemed to magnify a small portion of the fractal in a fairly static way.

Outputs:

Iter: Iteration since last reset.

X: X point for current iteration.

Y: Y point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

iA-iD: Initialization constants. Try different values to change the fractal behaviour.


Hilbert

The Hilbert, or Space-Filling curve, is different than the other fractals. It is not triggered along with a strobe, or a change, but with an address. Inside the Hilbert fractal is an array of points. You select those points with the address that you put into the Index input. If you put a simple linear counter, counting by 1 into the index, and draw a line from one point to the next, you get the classic Hilbert "curve" - a succession of straight lines at right angles to each other. The Depth input selects how many points the curve has, from 3 with a setting of 1, through 255 with a setting of 4, up to 65535 with a setting of 8. The depth can only change however, when a strobe is received at the Reset input, which also sends the Index count back to 0.

Where the Hilbert curve gets really interesting, however, is when a non-linear set of values is put into the Index. For example, have a counter Incrementing by 17, with a top value of 10000. Put the output of the counter through an IMod set to 253, with the Depth of the Hilbert counter set to 4. By drawing lines between each new point, wonderfully erratic drawings, which eventually coalesce to a possible symmetry are made. Another use is to use the Hilbert to specify the point at which images are placed in a screen. Interesting juxtapositions of images can be made in this way. For music, using ideas such as the above, and scaling the output appropriately can produce some interesting "found-object" sequences.

With this fractal there are no limits to exceed, and the outputs of X and Y are always from 0 to 1, so it's an ideal module to experiment with without worrying about things going out of range.

Outputs:

X: X point for current iteration.

Y: Y point for current iteration.

Max: Maximum points in curve.

Inputs:

Index: Address index (0-Max) of point..

Reset: Reset and initialize.

Depth: Recursive depth (1-8), larger values for smaller curves.


Henon

Fractal Henon strange attractor

Outputs:

Iter: Iteration.

X: X point for current iteration.

Y: Y point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

iA: Initial A value.

iB: Initial B value.

iX:Initial X value.

iY:Initial Y value.


IFS6Dim

6 dimensional IFS (Iterated Function Systems) fractal

Outputs:

Iter: Iteration.

X: X point for current iteration.

Y: Y point for current iteration.

Inputs:

Chng: Any change calculates next iteration.

Reset: Reset and initialize.

Ary#: Array number for 6 dimension initialization (4 sets of a-f & probability = 28 values per init table).

Table: Init table (multiplied by 28 to give table # offset in array).


1dCA3, 1dCA4, 1dCA5

1 dimensional Cellular Automata with 3, 4 and 5 cell neighborhood

Outputs:

Iter: Iteration.

Pop: Population of live cells per iteration.

Inputs:

Chng: Any change calculates next iteration.

Rule: CA Rule 0-127.

Seed: Seed on Reset: integer to set bits, 0.01 to 0.99 for rand density.

Reset: Strobe to clear and seed, strobe <0 to also clear history.

Rows: Rows is history, each iteration bumps top row down.

Cols: Columns is Number of cells to process.

Ary#: Array number to use for 1dCA and its history.


2dLife

Conway's game of Life 2d Cellular Automata.

Outputs:

Iter: Iteration.

Pop: Population of live cells per iteration.

Inputs:

Chng: Any change calculates next iteration.

Seed: Seed on Reset: integer to set bits, 0.01 to 0.99 for rand density.

Reset: Strobe to clear and seed.

Rows: Rows of cells in game board.

Cols: Columns of cells in game board.

Ary#: Array number to use for Life 2dCA results. Newly born cells are set to 2, other live cells are set to 1.

 

ArtWonk is Copyright © 2003-2008 by John Dunn and Algorithmic Arts. All Rights Reserved.