ArtMatic Engine References : Building trees

by Edward Spiegel and Eric Wenger

Methods for Exploration

One of ArtMatic family great strengths is that it allows many styles of rewarding exploration. It is possible to create beautiful art with either very limited or with very detailed understanding of ArtMatic's underlying principles. There are many different strategies that can be applied to creating works with ArtMatic. Below is a description of some strategies that have proved very productive. They are by no means mutually exclusive and are often used in combination.

One of the best ways to deepen your understanding is to explore favorite systems and examples. You can quickly develop a sense for the contributions made by the components of any system, and -- as you explore more and more systems -- you will develop a sense of how to manipulate a system to create different images and effects. As you learn, you will find that you are be able to take elements from one system and use them in systems of your own design. Ultimately, the key to creating ArtMatic art is to combine discovery, chance and design. Before we dive into techniques, a few words from ArtMatic's creator, Eric Wenger, may prove enlightening. In response to a letter from a user who was frustrated by not being able to predict how ArtMatic systems behaved, Eric wrote:
If it can cheer you up, I don't understand ArtMatic either. I mean that as soon as several operators are connected and interact on each other the mathematical equation quickly becomes way to complex to be of any use.
But it does not matter.
ArtMatic lets me INTERACT and experiment with the system. I don't have to fully understand why it does this or that. I still can play with it and learn how it behaves. So, even if I don't quite understand the system mathematically, I can develop a FEEL for it. And now that I have some experience, I can more quickly find or create a structure and settings that yield interesting results.
The order of the system's transforms [components] is important. You get very different results by inverting things. Complex system behavior can be mastered empirically.
What seems most helpful to me is to have a broad but clear understanding of the different classes or categories of transformations and how to interpret the inputs and outputs.

Designing Tree

When designing or trying to understand ArtMatic trees, it is helpful to understand the ways that components can function in structure trees. Where a function falls in the tree will influence how it behaves. A couple of categorization methods can help you to understand the structure and functioning of a particular tree. It is important to keep in mind that many components can play multiple roles--the precise functional role being determined by the component's placement in the tree and its connections. You can use components in ways that resist categorization or defy their original intent and discover astounding new images and effects in the process. In order to get oriented, though, it is useful to think of components as falling into a few simple categories (even though the categorization is a bit of a fiction).

When exploring a new system, it is a good idea to discover the schema - the tree's general abstract structure. The schema is a coarse outline of the tree that breaks it into functional units. You will find that complex trees often have very simple schemas with many tiles working together in functional groups.
To a degree, all systems share the following 'classic' schema:

Each of these schematic units might be quite complex, and, because tiles can be connected to multiple inputs and outputs, it can be difficult to isolate these abstract structural units. Even so, the attempt to identify them will help you gain insight into the tree's deeper structure. It should be pointed out that in a very complex tree, you often find individual branches that are schematically complete (i.e. they have this basic structure) and mixed together to create a composite image (each complete branch being an independent image mixed by a mixing component).

The basic functional categories are:

Space transform/distortion functions. These components transform or distort and remap a system's geometry and generally have the same number of inputs and outputs. They take a 2-D or 3-D space and remap it. The most basic space transform functions are the 22 Scale & Offset and 22 Rotate functions that scale and rotate the incoming space respectively. The 22 Twirl component is good example that distorts a normal Euclidean space by warping it into a whirlpool, and there are more complex remapping like 22 Complex inverse that sometimes defy description. Think of these components as functions that map the points of the incoming space to new locations. Typically, these components are the first ones in a system. They establish the geometry in which the subsequent surface, texture, space or object is drawn.

Space translation/Rotations/mirroring functions. This category is a special kind of space transforms functions that doesn't change the scale of the space. They are particularly useful for DF modeling as they always keep the Distance fields accurate. See Building 3D Objects : DFRM guide.

Surface/Texture generators/Shaders. These components map a point in space to a particular elevation or color or both. They take multiple input values (usually spatial coordinates) and generate a single output value (elevation, Mask, DF field) or a vector value (RGB color, RGBA color+Alpha). These components provide a surface or a texture for the space or objects which feed it. The 21 Ax+By+C (plane) and Gaussian Dot components are good examples of surface generators. Most components in this group may also be used as mixers. Context determines whether the component acts as a texture shader or a mixer.
There are many component that outputs both a color texture and the surface elevation like 24 MultiFractal noise # or 24 Color Regular tiles for example.

Mixers. These components mix the outputs of multiple branches/inputs into a single composite surface or image. Mixers can include mathematical operators like a simple addition, logical functions like Maximum or Minimum, or any operation that takes 2 or 3 inputs for a single output like a surface or a texture generator. Mixers can also work with packed vector data like the various packed logic or Maths tools. For example a typical mixing component would be 21 interpolate # or 21 Logic tools #.

Filters. These components have the same number of inputs and outputs and modify or remap the incoming values. All of the 1D (one input/one output) functions can be used as filters. For example, the 1D sine function will remap incoming values so that the output is restricted to values between -1 and 1; as a result, steadily increasing input values become cycling output values. If a sine filter is used at the output stage, the result is an undulating surface. By contrast, applying a random filter will result in the output value varying from the input value by a random amount.

Color functions . These functions can have 3 inputs and 3 outputs transform and filter the input colors like Color Controls #.They can also and translate the incoming points/pixels between different color representations such as RGB to HLS (and the reverse. As with 3D space transform functions they manipulate 3D vector data but assuming the data is a RGB color. Some components with 1 input and 3 output can generate a color according to various algorithms like 13 RGB gamma or 13 Main Gradient .

Flow and Data controllers. This category is different in nature with most of ArtMatic component as they are meta-functions that don't generate anything but are important for flow control and data formatting.
Pack/Unpack. A Pack(x,y,z) component enables the 3 values of an RGB component or a 3D component to be packed into a single packed value. Special functions that have 'packed' in their names can act on packed values (usually to mix them). This mechanism allows RGB/3D values to be passed through a single thread rather than requiring three threads. There is also a 4-input 41 Pack component. There are unpack components that take one input (a packed stream) and split it into its 3 or 4 constituent streams.
Iterations and loopers like the 23 Looper component controls the evaluation flow and can be used to create recursive and iterative calculations.

Well designed Trees are following universal rules of good design :
-Analyze your needs and try to make a schema of the task at hand. Identify the input dimensions and output type. Is it 2D or 3D ? does the output needs alpha channel ? is this a surface ? textured or not ? The answers will give the overall Tree structure.
-Divide the task into smaller chunks to simplify the problem. Test each chunk separately to make sure they works as wished.
-Use Compiled Tree to make a function re-usable and name the CT meaningfully.
-If a part requires several components but serve a limited purpose use a Compiled tree to keep the overall structure of the Tree as clear as possible.

A good knowledge of what components are available in ArtMatic Toolbox and what they do is of course useful to know how to implement a particular behavior.

Mysterious World of Complex Dynamical Systems

A comprehensive guide to image creation is beyond the scope of this manual for a number of reasons. While many simple ArtMatic systems produce easily predictable results, it is easy to create systems whose results have varying degrees of unpredictability. You can easily create or discover systems that will surprise even ArtMatic masters because one can create trees which implement complex mathematical or geometrical systems that have inherent unpredictability. One of the joys and--to some--frustrations of complex dynamical systems (the technical name for many ArtMatic systems) is that a system may inherently defy predictability due to its extreme lack of linearity. With such systems, it may not be possible to precisely predict how a system will respond to different input values and parameter settings. Oftentimes, the degree of unpredictability is only apparent when zooming far into or far out from a system or when modifying its settings. There is a lot of wonder to be discovered by chance. The trick is knowing how to harness those discoveries and mold them. It isn't necessary to understand the underlying mathematics to have great success with ArtMatic. By practice and experimentation you will develop intuitions and understanding that is more important than understanding the math.

To precisely design the wide (nearly infinite) range of possible images from scratch would (even if it were possible) require a fairly deep understanding of a pretty tricky (and fairly new) branch of mathematics. This level of deterministic control is actually impossible because many systems defy predictability--and even credulity. Consider this: when Benoit Mandelbrot first ran a program to plot the equation for which he is best known (and which has captured the imagination of so many), he believed that the fuzzy irregular graph being plotted was the result of a bug in the computer hardware. Entire books have been devoted to exploring the Mandelbrot set and the images it can create, and the Mandelbrot Set is just a single ArtMatic component. Imagine how hard it would be to pre-design the kind of images generated by a combination of tiles each of which was as unpredictable as the Mandelbrot Set!

Suggested Reading. While not directly-related to ArtMatic, there are a few non-technical books which may be of interest to those who want to understand more about the kinds of mathematics and systems which underlie ArtMatic. If nothing else, these books are entertaining and may give you a sense of why complex systems behave as they do. These books require no background in math to be enjoyed. Chaos by James Gleick is a great introduction to chaos theory and its history, and the story is engagingly told. Turbulent Mirror by Briggs and Peat is an entertaining book that explores chaos theory with lots of helpful analogies. Complexity by M. Mitchell Waldrop picks up where 'Chaos' leaves off. Computers, Pattern, Chaos, and Beauty by Clifford Pickover describes numerous equations and their visual pattern equivalents. The MathWorld.com website (http://mathworld.wolfram.com) is a great resource for anyone wanting to delve into the mathematical concepts that underlie ArtMatic.