The computer-generated fractal images can display beautiful, curious, or strange graphic patterns as shown in the Fractal Art Main Gallery or depict dreamlike or realistic 3D landscapes as shown in the Fractal Art Gallery Annex. If you know computer programming and are interested in creative activities in fractal art, the basic techniques described in Stories about Fractal Plotting and Fractal Art should provide you with a good starting point. You don't need to know college level math to produce and appreciate fascinating images, although higher math definitely helps you understand what's under the hood and get beyond the basic level.

Thank you for being visitor since initially posted on January 1, 1997.
The site was last updated on March 1, 2009. Any comments/criticisms via email will be greatly appreciated.

Digital Artist (Author's Profile): When Junpei Sekino was 10 years old he won first prize for the junior division in a national printmaking contest in Japan. He now combines art and mathematics to create fractal art. ......from MathThematics, Book 3, Houghton Mifflin, 1998, 2008.
© 1997-2009 Junpei Sekino
Stories about Fractal Plotting and Fractal Art

The Divergence Scheme The Convergence Scheme
Fatou Patterns Julia Patterns Newton Patterns Basic 3D Plotting

Speaking loosely without technical terms such as the Hausdorff-Besicovitch dimension and topological dimension of a set of points, a fractal, coined by Benoit Mandelbrot, is a geometric shape that is self-similar, i.e., a large part of it contains a great many smaller parts that resemble the large part in some way; see Figure 1 below. Nature is filled with fractals as seen in such objects as mountains, shorelines, trees (branches, barks and roots), ferns, fluid flow patterns, cloud formations (with or without lightning), blood vessels and mycelium strands. Mathematicians conceived the notion of fractal more than a hundred years ago and have since developed deep and extensive theories to formulate a field now referred to as fractal geometry. A novel and intriguing computer-generated fractal image plotted by Mandelbrot thirty years ago, called theMandelbrot set, stimulated and accelerated the development. It is now known that fractal geometry provides not only mathematical insights into natural objects and phenomena that are beyond the reach of Euclidean geometry but also numerous applications in surprisingly many areas in sciences, mathematics and art.

Through Google and Yahoo!, we can find thousands of Internet fractal galleries, many of which display stunningly beautiful computer-generated fractal art images. This indicates that a very large population not only appreciates the digital art form but also participates in the eye-opening creative activity. Written below is a guide on how to program a computer and plot popular types of fractals that are tied to chaos, which is itself a major discovery of the 20th century in science. Because of the close association to chaos, the output fractals tend to have unpredictable (and creative) forms, hence making the computer programming quite exciting. The subject is kept less formal and mathematical with light topics added here and there so as to make it more accessible to people with a minimum mathematics background. The audience, who may be merely intrigued by the mechanisms behind the fractal pictures, is encouraged to try it. It is fairly simple but stirs our deep imaginations and illustrates a tip of very profound mathematics; best of all, it's plain fun.

Each of the fractals we discuss here is generated by a single equation and may be classified into one of the three categories, which I call Fatou, Julia, and Newton patterns, using the names of giants in the history of mathematics contributed to fractal geometry. I should warn the audience at this stage, however, that the terms such as Fatou pattern are used for convenience in this site and not universally adopted in the field. The prerequisite for the subjects is to know (1) fundamental algebra and geometry of complex numbers, (2) beginning calculus, and (3) basic computer programming in such language as Java in a graphics mode. I use a modernized "object-oriented" version of Pascal called Delphi marketed by Borland. (1) includes the practice of writing a complex number z as a point (x, y) in the xy-plane as well as the standard algebraic expression z = x + yi. At the outset of each plotting process, we choose a rectangular canvas, part or whole of which will appear in the computer's display screen and which will be filled with a fractal at the end. The canvas comprises finitely many small rectangular picture elements, a.k.a. pixels. One of the basic routines in (3) (usually given in a programming manual) is a simple change of coordinates based on the "point-slope" equations of lines, which allows us to convert the canvas to a rectangular region R in the xy-plane consisting of points, er complex numbers (x, y). As in a basic graphics calculator routine, four real numbers called xmin, xmax, ymin, and ymax bound R.

For the sake of simplicity in our argument, we will identify each pixel in the canvas and the corresponding complex number in R, and consequently, regard the canvas and R to be the same. In particular, the number of complex numbers we consider is finite so a computer can deal with "all" of them in R. Also, at the beginning of the process, we choose an equation such as zn+1= zn2 + p involving two indexed variables and the third variable p called a parameter. After following the program, the computer will light up each pixel (complex number) in the canvas with a color determined by a simple interaction between the complex number (the pixel) and the equation and eventually display a fractal image on the canvas. Here comes an example:

(A) The Divergence Scheme

We begin our discussion with the rectangular region R in the xy-plane bounded by say xmin = -2.1, xmax = 2.1, ymin = -2.1, and ymax = 2.1 and the equation

(*) zn+1 = zn2 + p ,

where the parameter p is a complex number in R (which is our canvas). (*) is called the Mandelbrot equation or Fatou equation (sometimes) as Pierre Fatou came up with the following idea nearly a century ago.

The best-known figure in fractal geometry is given by iterating the Fatou equation using the initial value z0= (0, 0) for n = 0, 1, 2, ... , M, and for "every" parameter p in R. Here M is a prescribed maximum number of iterations that rescues the computer from getting trapped in an infinite loop, and M = 500 is used in this example. M is almost always a number between 50 and 500,000 but it occasionally gets as large as 2,000,000 in my program. Assuming that our object is to plot a picture in black and red with a background or canvas color say white, our painting scheme is basically given by the IF statement:

  • If |z1| > 2 then color the pixel p black,
  • else if |z2| > 2 then color the pixel p red,
  • else if |z3| > 2 then color the pixel p black,
  • else if |z4| > 2 then color the pixel p red,
  • etc.,
  • where |zn| stands for the modulus or absolute value of zn. It can be shown that |zn| > 2 for some n if and only if the sequence |zn| tends to infinity as n increases; this implies that the above scheme assigns a color to each parameter p (which is a pixel, remember?) according to how fast the complex number zn escapes from the circle of radius 2 before taking a long journey toward infinity. This basic scheme can be streamlined in the actual program by using:

  • just two variables zold and znew instead of the large array z0 , z1 , z2 , ...;
  • |zn|2 > 4 in place of |zn| > 2 to avoid the hidden square root operation; and
  • MOD operation to replace the awkward IF statement by a few good looking lines.

    Also, the use of any radius greater than 2 (say 100) in place of 2 in the above scheme works just as well and in some cases even better. Computer programming has two faces, art and science, and requires artful wits as well as rigidly logical thinking. Writing, streamlining and debugging computer programs, therefore, provide us with an ideal way of exercising our brain and maintaining normal connections among the neurons. I would recommend it highly to people with PCs to take up computer programming.
  • As we noted, the color of a pixel is determined according to the "escape speed" of the corresponding sequence zn = z0 , z1 , z2 , ... from a prescribed circle about the origin. Since all of the escaping sequences diverge to infinity, I call the coloring scheme (without limiting a number of colors) the divergence scheme. Figure 2 is given by the above basic red-black divergence scheme, and the area that retains the white canvas color depicts the famous Mandelbrot set (or M set, for short). The set consists of the parameters (pixels) p attached to the sequences zn that stay within the circle forever regardless of the value of n. If we alter the values of xmin, etc. and run the same program to zoom in on a small area of the plot near the boundary of the Mandelbrot set, we will discover the self-similarity property of fractals along with a hairy characteristic of the "snowman". Many microscopic shapes resembling the snowman are connected by a network through curious and extremely intricate patterns, which we can find by zooming intently and patiently; for example, see the Mandelbrot Set or Elephant M Set in the gallery. Not surprisingly, it has been verified that the Mandelbrot set is one of the most complex figures ever plotted on a piece of paper (in terms of the so-called Hausdorff-Besicovitch dimension and other advanced properties).

    Here is the very essence of our fractal plotting: The closer the zoomed area is to the boundary, the finer the fractal pattern. The reason, which leads us to the idea of chaos, is that parameters p near the boundary often come from sequences zn with diverse properties interlaced in a complex fashion. Thus, a very slight change in the "starting" value p = z02 + p in this area may result in an utterly different "future behavior" of zn which dictates its escape speed and the pixel color. Yes, these sequences zn are just like people, most of whom would behave unpredictably when they are placed near an infernal border between life and death and cause chaos for the whole population in the area. What is interesting in mathematics is that chaos near the border between life (staying within the circle) and death (diverging to infinity) stems from an equation such as (*) which looks totally well behaving and instead of ugly consequences it produces beautiful fractal patterns. You might remember that Steven Spielberg's Jurassic Park premiered in 1993 has a mathematician who introduced himself as a "chaotician." A chaotician obviously deals with chaotic behaviors of various dynamic mathematical systems, a.k.a. dynamical systems, including our generating equation (*). It was in fact around the 1970s and the early 80s when several significant events coincidentally took place in mathematics: People saw the computer-generated bizarre-looking and epoch-making Mandelbrot set for the first time; the new field called "chaos" was born from a computer experiment and created a great sensation among younger mathematicians; powerful computers found their way to become main tools among theoretical mathematicians who used to pride themselves on using only pencil and paper to discover recondite theories. Like in chemistry and physics, experimental investigations are now important part of mathematics.

    (B) The Convergence Scheme

    The divergence scheme leaves the Mandelbrot set stuck with the canvas color since none of the parameters in the set are attached to escaping sequences. Among those sequences that stay within a finite range, many converge to a point in the set with varying speeds. We can therefore color-code each of the parameters in the Mandelbrot set according to the speed of convergence of the corresponding sequence. This convergence scheme is based on so-called Cauchy's criterion and given by replacing |zn| > 2 of the divergence scheme by

    |zn+1 - zn| < s,

    where s is a small number like 0.0000000001. Incorporating the convergence scheme and a greater number of colors into the earlier program may result in a picture like Figure 3. The gold area consists of the parameters attached to the convergent sequences while the green disks are associated with the sequences that eventually become almost periodic of period greater than one. These virtually periodic sequences neither converge to a point nor diverge to infinity, but one can still color-code the accompanying parameters in a similar fashion in order to add more varieties to the image.

    (C) Fatou Patterns

    Since it was published in 1980, the Mandelbrot set became so popular that zillions of digital artists, mathematicians, and computer programmers and hackers have explored around it and shown their fractal images on a variety of objects including web pages, posters, book covers, T-shirts, and coffee mugs. Although the complexity of the M set is boundless and the hidden beauty inexhaustible, it has become quite a challenging task to unearth new patterns from the Fatou (or Mandelbrot) equation (*) using available computers and software. Consequently, creative work calls for modification of this formula, and there are infinitely many formulas available for this purpose. I call a fractal given by the divergence/convergence scheme applied on a dynamical system of the form

    (**) zn+1 = fp(zn)

    a Fatou Pattern, where fp is a function of complex numbers that contains a parameter p. For example, we may find Fatou Patterns using the logistic equation

    zn+1 = fp(zn) = p(1 - zn) zn .

    An initial value z0 is usually chosen from the so-called critical points of the function fp at which the derivative vanishes, but this is not necessarily mandatory from an artistic viewpoint. As you can see in the picture
    Logistic Equation, a non-critical initial point like z0 = (0.1,0) provides us with certain deforming effect. The picture also shows a substantial difference between the logistic and Mandelbrot equations even though the two equations are known to be very close relatives and conceal similar fractal patterns. From the logistic equation and its behavior discovered through computer simulations, the term chaos was born in 1974. The subject that appeared to connect the world of randomness and certain "deterministic" processes stirred up great interests in the mathematics world in much of the late 20th century. The primary application of the logistic equation lies in population dynamics, which explains why the chaotician had his role in Jurassic Park.

    (D) Julia Patterns

    A fractal, which I call a Julia pattern, is given by fixing the parameter value p in the dynamical system (**) and iterating it for every choice of the initial value z0 (instead of p in plotting Fatou Patterns) in the rectangular region R (which is our canvas). Thus, z0 plays the role of a pixel in the canvas. As in the case of a Fatou Pattern, a Julia pattern appears more interesting when the parameter value p is chosen in an area where the sequences zn behave unpredictably. A Julia pattern with an appropriate p value contains what appears to be the boundary between two sets, one consisting of every z0 which keeps the sequence zn within a fixed circle and the second set consisting of every other z0. The boundary is called a Julia set, which is an important object in fractal geometry. Gaston Julia, Pierre Fatou, and several other mathematicians, amazingly envisioned fractal images generated by certain dynamical systems about a hundred years ago using sheer imaginations. Gatekeepers in Figure 1 above, for example, is a Julia pattern given by

    zn+1= zn3 + zn + p, p = (0.185, 0.00007666),

    on the rectangular region with xmin = -1.1, xmax = 1.1, ymin = -0.7, and ymax = 0.7. The gatekeepers are painted by the convergence scheme with various shades of gold and the red background by the divergence scheme; thus, the Julia set in this pattern is depicted by the outlines (or the boundary) of the gatekeepers. Once you find a value of p yielding a nice Julia pattern, change the value slightly to see if you can improve the picture while retaining the same motif. The corresponding change in the picture sometimes appears gradual and sometimes quite dramatic as you can see in Julia Dragons in the main gallery.

    (E) Newton Patterns

    A fractal, which I call a Newton Pattern, is a Julia pattern given by a dynamical system of the form

    zn+1 = zn- g(zn)/g'(zn)

    where p = (0, 0) is invisible and g is an elementary function with its derivative g'. Although g is a function of a complex variable, the familiar rules of differentiation in the beginning calculus hold for g. As you may have recognized already, this dynamical system is, in practice, Newton's Root-finding Algorithm, and as such, it converges to a root of the equation g(z) = 0 quickly more often than it converges slowly or diverges. For this reason, the convergence scheme alone is usually used to process a Newton pattern. Furthermore, M, the maximum number of iterations, for my Newton patterns is typically between 50 and 500 instead of between 500 and 2,000,000 for Fatou and other Julia patterns. As in a general Julia pattern, an interesting Newton pattern is a fractal that contains (at least a part of) a Julia set, which ironically causes the chaotic behavior of the otherwise extremely useful root-finding algorithm.

    In my program, g is always a polynomial which allows me to take advantage of the time-saving scheme called Horner's Synthetic Division to evaluate both g and g' efficiently and the stable Müller's algorithm to find all roots of g. Why do we want the roots? Well, Figure 4 above is a Newton pattern over the unit disk of the complex plane given by the polynomial

    g(z) = z3 - 1

    and the advanced convergence scheme, which, as explained in
    Newton's Basins of Attraction in the Fractal Art Main Gallery, utilizes the roots in the coloring scheme as well as the number of iterations. Arthur Cayley, one of the great mathematicians of the 19th century, did not know chaos involved in Newton's method and was frustrated by a geometric problem that turned out to be equivalent to sketching the three-color Newton Pattern (without shading) using pencil and paper. Without computers, mathematicians like Cayley and Georg Cantor began to recognize the existence of fractals in the late 19th century.

    (F) Basic 3D Plotting

    As we know by now, each pixel color is determined by the number of iterations the corresponding sequence undertakes before escaping from a circle of a prescribed radius or before getting sufficiently near a fixed point in the complex plane. This number, say w, of iterations adds one more dimension to the complex number underlying the pixel that already has two dimensions (x, y). Following elementary three-dimensional analytic geometry, therefore, we may plot every point of the form (x - dy, w - dy) in the xw-plane using a pixel color determined by w, where d is a nonnegative real number between 0 and 1. If the "depth" number d is nonzero, the above scheme creates an illusion of having an object in the three-dimensional space with x- and w- axes that are horizontal and vertical and y-axis that is perpendicular to the xw-plane. Note that the expression dy has nothing to do with calculus. If d happens to be zero, the picture will lose the depth and show the projection (or the side-view) of the object on the xw-plane. Here is a caution about the 3D plotting: When a dynamical system becomes highly chaotic (which is desirable in the earlier 2D plotting), it tends to give too many variations on the altitudes w causing the fractal pattern to look like a reedy swamp. To remedy this problem, we may plot the points of the form (x - cy, h(w) - dy) instead, where c and d are real numbers (that may be negative) and h is a "height" function. For example, if h is the natural logarithm, it may de-emphasize the excessive variations of w. Figure 5 shown above is basically given by c = 0, d = 0.7, and the piecewise defined height function

  • h(w)= w, if w is the number of iterations in the divergence scheme;
  • h(w)= 2M - w, if w is the number of iterations in the convergence scheme
  • where M = 500. More examples are shown in the
    Fractal Art Main Gallery.

    You can extend the basic techniques described above and draw more artistic and/or realistic 3D images by learning various ideas in Multivariable Calculus, Linear Algebra, Numerical Analysis and Topology. The Fractal Art Gallery Annex shows some of the advanced examples.
    Links
    Pacific Northwest Section, Mathematical Association of America
    Universität Kassel, Mathematics for Liberal Arts Information Page
    Benford Applied Mathematics Ciencia, Tecnología e Internet
    Google>Fractal Plotting Yahoo!> 3D Fractal Art

    Fractal Home Fractal Art Main Gallery Fractal Art Gallery Annex
    Top of the Page Sekino's Home Page Willamette University Willamette Mathematics Department