Fractals not complex at all

In the 1990s, computers were often equipped with a program that made its users spend hours and hours of delight. Incredibly, we’re not talking about a video game, but Fractint. It was a free program that could calculate fractals incredibly fast and then with the +, – and <space> a psychedelic show started in which the extraordinary shapes were animated by breathtaking colors, creating very creative trips.

The wonder of fractals: zooming into Mandelbrot set

The extraordinary shapes of the Mandelbrot or Julia set are generated by a very simple iterative formula in the complex numbers domain: z_{n + 1} = z_n^2 + c
The fundamental question is: how can such rich forms derive from a very simple formula? The secret lies, of course, in the iteration which also explains the repetition of patterns within the fractal structures, as if they were musical variations of a theme or elaboration of temple decorations. In practice, by carrying out a sequence of affine contractive transformations (IFS), the result can be a fractal of any shape.

Let’s focus on Julia’s set: for each point z of the complex plane, we compute z ^ 2 and then add a fixed constant c for all points. The number we get will be the starting point for another iteration. The behavior of this sequence is very variable: it can explode towards very large numbers, or remain contained, let’s say within a radius r from the origin. If after a certain number of iterations the sequence does not diverge, we affirm that the point belongs to the fractal.
As a further refinement, we can assign a shade of color based on the value of the sequence at the end of the calculations.
One of the possible results (which depend on the choice of c) is the following, obtained with c = (0.32176 + 0.53227 i) and a limit of 50 iterations:

After presenting the “classical method” fractals, we want to achieve a goal halfway between the absurd and the useless, but with the prospect of finally being able to understand the characteristics of fractals. We want to eliminate complex numbers from fractals, transforming them into vector operations and therefore potentially applicable in reality, for example on a sheet of paper.

As already said, if we want to correctly vectorize a complex number, we must multiply it by the base which for us identifies the direction of the real axis (say e_1): Z = \pmb {v} / e_1
Then the Julia fractal formula in vector form will become:

\pmb{v}_{k + 1} e^{-1}_1 = \pmb{v}_k e^{-1}_1 \: \pmb{v}_k e^ {- 1}_1 + c e^{-1}_1

which is equivalent (multiplying to the right by e^{-1}_1) and considering that e^{-1}_1 = e_1 to the equation:

\pmb{v}_{k + 1} = \pmb{v}_k e_1 \: \pmb{v}_k + c

which expresses a geometric fact: the next vector of the iteration is equal to the reflection of the base e_1 with respect to the previous vector to which the constant vector c is added.

Then we can generate the Julia fractal in this way: for each point of the plane represented by the vector \vec{v} = (x, y) we mirror the base e_1 on this vector, we scale it by a factor |v| and then add c. The resulting vector will be subjected to the same operations until the fixed iteration limit is reached.
If the result is bounded (say inside the circle of radius 2), then the starting point belongs to the Julia set.

Let’s look at the overall result: some points of a shape that we do not know at the beginning of the process (in fact, only at the end of the iterations do we know if the point belongs to the set or not) are mapped into the circle of radius 2. So let’s do it smart: to generate the Julia set we start from the circle of radius 2 and reverse the process!

The points of the fractal are those that do not diverge, so they map to a circle of fixed radius

\pmb{v}^{-1}_k\:(\pmb{v}_{k+1} -c)\: \pmb{v}^{-1}_k= e_1

\begin{equation} \frac{\pmb{v}}{|v_k|^2}(\pmb{v}_{k+1} -c) \frac{\pmb{v}}{|v_k|^2}= e_1

The new process will therefore be: we will start from the circle of radius 2, we translate it in the opposite direction with respect to c and at this point we apply the inverse transformation: the new vector will be on the bisector between the old vector and e_1 and the module will be its square root.

We start from our counter image, hence the circle of radius 2
We apply the -c shift
The inverse operation consists in the unfolding (shown here what is mapped in the upper half plane …
… followed by the analogous one for the lower half plane and the whole is reduced by the square root
After three iterations we begin to guess a shape
After 12 iterations, self-similarity is sensed
After 128 iterations it is a real fractal.
Sequence from Steven Wittens’ excellent post “How to fold a Julia fractal“.

The extraordinary fact is not only that we have produced a fractal without resorting to complex numbers, but also the fact that – as already said – the GA scales dimensions without difficulty and in fact we can apply the same formula in 3D and we obtain a Julia fractal 3D, without further effort.
If the result is nice, well … is a different kettle of fish.

Rendering of a 3D Julia fractal, from Wareham and Lasenby,
Generating Fractals Using Geometric