## Exactly how does one make art solely from mathematical formulas?

When I display my art in galleries and art shows, I'm often asked for a more detailed description of how art can be made solely with mathematical formulas. Don't I mean that I've taken photographs or drawings and manipulated them somehow? "No," I patiently explain, "in all but a few rare images, my art is made entirely with mathematical formulas." How is this possible, they want to know? Based on most folks' experience with math, it's difficult to conceive of how such a process might occur.

The problem is that there isn't a similar art technique, or an ordinary mathematical application with which we can make a reasonable analogy. As with anything brand new, without analogies, or the ability to see a live demonstration, it's quite difficult to wrap our minds around something we've never experienced. Even if you could peer over my shoulder as I create an image, you still wouldn't have a clear conception of what was going on.

After time and much frustration, my impromptu explanations eventually evolved into one that begins with ideas and pictures that are familiar to everyone, even if the analogies aren't entirely accurate, and progresses into more technically-precise explanations along the way.

First let's start with the concept that math equations can be used to describe or draw simple geometric shapes like circles, polygons, and spirals. Most of us had some experience with this in school. So let's start with a simple, gently-curling spiral shape such as this →

Think of this spiral shape as the underlying structure for the image we're going to build. Instead of a solid line, let's overlay the structure with a series of dots. Note that they decrease in size just as the spiral structure decreases in width as the curve tightens.

We could do a similar thing with squares — overlay the underlying spiral structure with a series of square shapes.

Or even abstract shapes like these →

In each of the above examples, we have an invisible base structure created with one mathematical equation, that is (as we say in fractal-speak*) "colored by" a geometric shape drawn by a "coloring" algorithm. These "coloring" shapes follow not only the path, but the width of the underlying spiral structure. We're going to call this the first iteration of our shape. So far, so good? If so, let's start to give this spiral some fractal characteristics.

* Coloring in fractal-speak refers not to actual colors like red, blue and green, but to the general way in which the underlying fractal structure is made visible. When we need to speak of actual color, we'll use terms like gradient, palette, hue and tone.

I just want to note, at this point, that by altering the equations slightly, we could change the arc, size, direction, and angle of both the spiral pathway and the coloring shapes. We'll keep these for consistency throughout this demonstration, but a fractal artist always has the ability to alter those elements of every shape.

A fractal is never just one finite shape, but is actually a large structure entirely composed of self-similar structures of ever-decreasing size. Take a look at this image →

We still see the first iterated spiral of dots, but the five largest have now been replaced by five miniature spirals that resemble the original. The largest dot in the second iteration of spirals is the one that follows the shape of the original underlying structure. If this pattern were to continue for every dot in the first iteration, we would have two complete iterations of our soon-to-be-fractal spiral structure.

Here's the beginning of a third iteration. Note how the dots in the largest 2nd-iteration spiral have now been replaced by even smaller copies.

Up to this point, I constructed these images by hand, copying shapes and pasting them at reduced sizes along the underlying structure. Clearly this would be tedious and we would quickly reach the limit at which a human hand could draw the ever-diminishing shapes. But can you picture the concept that every dot in each iteration of our original underlying structure could be replaced by a smaller, self-similar shape? Because the shapes can be drawn by mathematical expression, and computers have a much more efficient and tireless processor than the human brain, the number of possible iterations is infinite — far beyond what we can actually see at once. But fractal structures can be "zoomed into", much like one can use a microscope to explore the minute details of biological or chemical structures.

If you're still with me, it's time to move from hand-drawn illustrations to a real, mathematically-generated fractal.

Here is a portion of an actual fractal that closely resembles the spiral with which we've been working. Note that the largest dots describing the original underlying spiral structure are clearly visible. From there, things quickly get more complex as the second-iteration structures are a bit more complicated than my hand-drawn versions. But you can still observe that the structures that comprise the original shape are repeated at ever-decreasing size. It's still difficult to see more than three actual levels of shape in an image of this size, but I can assure you that they're there.

The preceding image was actually only part of the underlying spiral structure for this fractal. If you start with the largest black oval in this image, the one with the red dot, and proceed to its right, toward the yellow dot and beyond, you see the gentle curl of our prototype spiral.

But if you move leftward from the red dot, toward the blue side, you'll see the structure resolve into a very tightly-wound spiral. Together, the tightly-wound side and the gentle curl comprise our total underlying structure for this particular fractal. And now if you look at the smaller iterations emanating from each large dot, you'll see each contains both the tightly-wound and gently-curled paths.

The image above is actually only half of the entire fractal structure, called a Julia set, after the 20th century French mathematician, Gaston Julia. Classic Julia sets are closely related to the Mandelbrot set, named for the man generally thought of as the father of fractal geometry, Benoit Mandelbrot. They typically consist of two halves that are rotationally symmetrical. In each of the following images, you can see that the top half of a full Julia set is a 180°-rotated replicate of the spiral in the previous illustration. So if you stood on your head, the new bottom half would look exactly the same as the original version with your feet on the floor.

The formula for this Julia set is:

Before we go any further, it might be good to remember that the entire underlying structure of this Julia set is determined by this formula. The elliptical shapes are determined by a second (coloring) algorithm. Given these two formulas to compute, a fractal generator such as Ultra Fractal performs the necessary calculations and renders the fractal onscreen.

And just as we colored our original spiral path with squares and abstract shapes (as above), we could choose different coloring formulas to apply to our Julia set instead of the elliptical shapes. But before we consider that, let's look briefly at the black and white gradient used in our illustrations thus far.

Separate from the coloring algorithm (remember, it doesn't really have anything to do with color), is a tool called a gradient editor where a palette of hues and tones is specified. The coloring formula is actually indexed to the values in this gradient, which is is what determines the color of each point or pixel in the image.

Here is the gradient we've used in our images thus far:

Note the sharp edges of the black and white sections. This corresponds to the sharp edges of the elliptical shapes in our fractal.

Now take a look at this gradient, in which the progression from white to black is softer, with a range of grays inbetween.

When indexed to our coloring algorithm and applied to our fractal, the ellipses take on a more three-dimensional shape. The varied tones in the background area give a sense of depth, as well. The fractal structure and coloring algorithms remain the same; the sculpting and lighting effects come from the manipulation of the gradient. Nifty, huh?!?

Now let's take our sculpted grayscale gradient, index it to some different coloring algorithms, and color our fractal with some interesting shapes. First, the abstract blob from above →

Notice how the blobs still follow the familiar tightly-wound spiral and gentle-curl pathways of the Julia in every iteration, at every size. Look closely at these two pathways now, because things are about to get more complex!

Here's our next coloring algorithm — one that draws curved filaments instead of ellipses or blobs. Not only that, but the filaments extend outward far enough to touch and overlap each other. Now, instead of discrete shapes that clearly delineate the underlying spiral structures, these filaments give the illusion of connectivity, bringing together the parts into a whole.

Since you know what to look for (or can refer back to the unadorned Julia sets above), see if you can still identify the largest tightly-wound spiral and gentle curl in each half. Although they're a little harder to identify in all this complexity, you should still be able to find the smaller repetitions of these two pathways as they comprise the larger iterations.

Next, let's look at a coloring algorithm that not ony places shapes along the underlying base structure, but also outward into what otherwise has been background area in our image. The spherical shapes, and their relative magnitudes help us identify the familir tightly-wound and gently-curled spiral pathways.

And finally, for one final type of effect, an all-over texture that completely fills the image with texture.

Coincidentally, the same coloring formula was used for this effect and the all-over spheres in the previous image. Just a change in two of the formula's parameters creates the different effects.

The last five images illustrate four different coloring algorithms and five different shape and textural effects. If we save each as a separate layer in our image, we can begin to combine them together so that features of each contribute to a finished image.

The last image, containing the all-over texture, would make a great background for our image. On top of that, we could place the layer of curved filaments.

By making the white background of the filament layer transparent, the background texture layer shows through, surrounding the clearly visible filaments.

On top of these two layers, we can place the layer of sculpted ellipses. With the fractal structure so clearly illustrated now, notice how the three layers align. And, thanks to our grayscale gradients that sculpt and shade, the ellipses seem to nestle into the textures and filaments underneath.

Next, we can place the blob layer on top of the others, where it seems to carve designs into the ellipses.

And finally, placing the all-over spheres on top of everything else, they contribute a little sparkle to both the foreground shapes and the background textures.

You're probably thinking, "This is cool, but what about color?"

Hold onto your hat, here we go...

Each layer in our image is indexed to its own separate gradient. That means that specific areas of each layer can be emphasized, colored, or made transparent. In the image to the right, I've used mauve hues in the background texture, made the curved filaments green, given the white ellipses a bright pink edge, and made the all-over spheres bright white with mauve edges.

The gradient for the blob layer has three hues: a creamy white, deep fuschia, and green:

The one challenge to adding color to fractals, though, is that every repetition of a shape is indexed to the gradient in the same way, meaning that each has identical coloring. Consider each repetition of the ellipses and blobs in this image: they're identical. If I adjusted the gradient to include a different hue, every instance of that shape would be affected.

It's not possible, under ordinary circumstances, to make just one ellipse blue, or to change the hues in a few selected blobs. But there are tricks to get around these obstacles.

In this image, I've changed the gradients for each of the layers, but if you look carefully, I've also employed a technique* that alternates hues in the ellipse layer. While both of the largest ellipses are golden, if you follow the structural path in either direction, you'll see that the next ellipse is gray, then golden, then gray — continuing this alteration throughout.

* I teach this and many of the other techniques used in these images in my series of Ultra Fractal Courses.

In this image, I've further varied the gradients and effects on each layer. By also employing different merge modes, I can combine the effects of each layer in even more ways. Between the formula parameters, individual gradients, controlled transparency and merge modes, there truly are so many options available to the artist!

Not every image has to be dark and moody! Here's a lighter, happier option →

On the other hand, my beloved textures are more visible on a darker base so here's one last earthy version that shows the versatility of these formulas and techniques before finishing with...

...this whimsical bejeweled, deviled egg platter heading straight for the heavens.

Hopefully this demonstration has shed a bit more light on the process of creating art with mathematical formulas and on how many options the artist has to work with in the creation process. There are literally thousands of fractal and coloring algorithms to choose from, each with their own sets of parameters which can be manipulated. If I could make these six varied versions with just a handful of layers, think how many images could potentially be made with all the available formulas, parameters, gradients, and other tools. This is why I refer to my work as Infinite art.

The process of creating art from math is unlike any other visual art technique, and the learning curve is quite steep, but the magic and pleasure of exploring, manipulating, and creating fractal art is highly addictive!