Identifying Strange Attractors

Articles —> Identifying Strange Attractors

An attractor can be defined as a system of equations whose behavior evolves over time. One of the more famous attractors is the Lorenz Attractor, a system of differential equations whose behavior, when visualized in two or three dimensions - resembles that of a butterfly.

The Lorenz attractor is perhaps the most studied attractor, however there are other attractors of note, for instance the Aizawa and DeJong Attractors. In all likelihood however, an infinite number of attractors exist.

An attractor can be mathematically defined as:

xn = xn-1 + t * fx(xn-1, yn-1, zn-1)

yn = yn-1 + t * fy(xn-1, yn-1, zn-1)

zn = zn-1 + t * fz(xn-1, yn-1, zn-1)

Where t is time and the f is a function dependent upon - in this context - 3-dimension values (any number of dimensions can be represented, but this article focuses on 3-dimensions for visualization reasons).

In an effort to discover new, aesthetically pleasing attractor systems, I constructed an algorithm to generate random sets of equations for use in the above system of equations. The algorithm treats each equation as a syntax tree - each node of the tree is one of three types of nodes:

  • Constant Node: This node is simply a constant floating point numeric value. This node has no children.
  • Input Node: This node represents a value from the previous calculations. This node has no children.
  • Function Node: This node represents a mathematical function, be it multiplication, addition, subtraction, sin, cos, etc...Function nodes have one or two child nodes, depending upon the functional parameters. For instance, addition works on two values and thus has two children, whereas cosine works on a single value and thus has one child node.

The value of the equation can be calculated by recursive traversal of the tree: for each node determining the value of its child node, and passing this value to its parent. An example of an equation tree is depicted below:

equation represented as a binary tree

The dx equation of the Lorenz system represented as a binary tree.

Constructing a tree from the random selection of the nodes results in a random equation. Of course, randomly generating equations can result in all sorts of behavior, from the function returning a constant, to alternation between values, to function which converge to a value (including infinite and 0). To better focus the attention of the algorithm on attractors, several rules were implemented. First, a function cannot cannot produce a constant. Second, a function cannot produce non-mathematically defined values, for instance NaN or infinite. Third, the system does not converge over a reasonable time. Lastly, the values created over a reasonable period of time are contained within a reasonable bounds - for instance in the 3-dimensional systems constructed here values are contained within a cube centered at 0 and a width of 20.

The above algorithm was implemented in java* and visualized using two and three dimensional rendering in Swing. The generated systems of equations typically result in a wide array of behaviors, many of which lack one of my requirement as being aesthetically pleasing. Occasionally however, a system of equations is discovered that produces incredible behavior. Below I list several systems of equations discovered with this approach.

  • Spring: This attractor is defined by the following equations:

    fx = cos(y)

    fy = 0.56 + x - z

    fz = 0.13 * (y-z)

    random attractor

  • Windmill: This attractor is defined by the following equations:

    fx = sin(cos(y))

    fy = sin(sin(cos(0.96)) / x)

    fz = sin(y-z)

    windmill attractor

  • Vortex: This attractor is defined by the following equations:

    fx = (z-0.86) * z / 0.96

    fy = z * (y+x)

    fz = (0.3069 - y)*(0.35-x)

    windmill attractor

Systems were also generated in which each new value is dependent upon the function alone, and were found to more frequently generate aesthetic behavior relative to the method above. Mathematically:

xn = fx(xn-1, yn-1, zn-1)

  • Embryo: This system is defined by the following equations:

    fx = z*y / 0.92

    fy = y - x + 0.32

    fz = 0.69 + y

    embryo attractor

More rules can be applied to the generation algorithm which can increase the frequency of discovering an interesting system of equations. In addition, a similar method can be used to generate colors for each point, resulting in coloration schemes rather than the single color images seen above.

*Java source code available upon request



There are no comments on this article.

Back to Articles


© 2008-2017 Greg Cope