Back Home

The Whispering Fractals: A Primer

Welcome to an introductory exploration of fractal algorithms. Fractals are fascinating mathematical sets that exhibit self-similarity on all scales. This means that no matter how much you zoom in, you will see similar patterns repeating.

The Mandelbrot Set Generation

One of the most iconic fractals is the Mandelbrot set. Its generation relies on a simple iterative process applied to complex numbers. For each complex number `c`, we iterate the function `z = z^2 + c`, starting with `z = 0`. If the magnitude of `z` remains bounded (typically below 2), then `c` is part of the Mandelbrot set.

The iteration is usually performed a fixed number of times (e.g., 100 or 1000). If the magnitude exceeds 2, we can assume `c` is not in the set, and the number of iterations it took to escape can be used to color the fractal.

z_n+1 = z_n^2 + c, where z_0 = 0 and c is the complex number being tested.

The Julia Set Generation

Closely related to the Mandelbrot set are Julia sets. For Julia sets, the constant `c` is fixed for the entire set, and the iteration is performed on different starting values of `z_0`. Like the Mandelbrot set, the escape time of the iteration determines the coloring.

The fixed `c` value is crucial for the shape of the Julia set. Different `c` values produce vastly different, often beautiful and intricate, fractal patterns.

L-Systems: Algorithmic Plant Growth

Beyond complex plane fractals, L-systems (Lindenmayer systems) are a formal grammar used to model the growth processes of plants and other organisms. They consist of an alphabet of symbols, a set of production rules, and an axiom (an initial string).

An L-system evolves by repeatedly applying production rules to replace symbols in the current string with new sequences of symbols. These strings can then be interpreted graphically to draw fractal shapes, often resembling natural structures like ferns or trees. For example, a simple rule could be 'F' becomes 'F[+F]F[-F]F', which can generate branching structures.

While this page describes the algorithms, actual visualisation typically requires graphical rendering capabilities, often implemented in languages like Python with libraries like Matplotlib or specialized fractal software.

Try a Fractal Concept

Imagine you have a set of rules for drawing. If your first step is a straight line (represented by 'F'), and the rule is: "When you see 'F', draw a line, turn left 90 degrees, draw another line, turn right 180 degrees, draw a third line, turn left 90 degrees, and draw a fourth line." What kind of pattern do you think would start to emerge with repeated application?