User:Gertbuschmann/Images of Julia and Mandelbrot sets

The computer-generated Julia and Mandelbrot sets have become famous because of the startling shapes they can take. No mathematical concept results in so many hits on the Internet, and it is the pictures that most people go for. Therefore, this article will be limited to the part of the theory that concerns making of pictures. It will state all the definitions, results and formulas required (explained in more detail in the articles Julia set, Mandelbrot set and attractor) and show how the computer can draw technically perfect pictures. It will also look at how it is possible to find the exceptional values of the parameters that give the most striking Julia sets and (strange) attractors.

The Julia set and the Fatou domains
Let $$f(z)$$ be a differentiable mapping from the plane into itself. We assume first that $$f(z)$$ is differentiable as a complex function, that is, that $$f(z)$$ is a holomorphic function. Moreover assume first that $$f(z)$$ is rational, that is, $$f(z) = p(z)/q(z)$$, where $$p(z)$$ and $$q(z)$$ are complex polynomials. If the degrees of $$p(z)$$ and $$q(z)$$ are m and n, respectively, then d = m &minus; n is called the degree of $$f(z)$$.

The theory of the Julia sets starts with this question: what can happen when one iterates a point z, that is, form the sequence $$z_k$$ (k = 0, 1, 2, ...) where $$z_{k+1} = f(z_k)$$ and $$z_0 = z$$?

The three possibilities
Each sequence of iteration falls within one of these three classes:

1 The sequence converges towards a finite cycle of points, and all the points within a sufficiently small neighbourhood of z converge towards the same cycle.

2 The sequence goes into a finite cycle of (finite) polygon shaped or (infinite) annular shaped revolving movements, and all the points within a sufficiently small neighbourhood of z go into similar but concentrically lying movements.

3 The sequence goes into a finite cycle, but z is isolated having this property, or: for all the points w within a sufficiently small neighbourhood of z, the distance between the iterations of z and w is larger than the distance between z and w.

In the first case the cycle is attracting, in the second it is neutral (in this case there is a finite cycle which is centre for the movements) and in the third case the sequence of iteration is repelling.

The set of points z, whose sequences of iteration converge to the same attracting cycle or go into the same neutral cycle, is an open set called a Fatou domain of $$f(z)$$. The complement to the union of these domains (the points satisfying condition 3) is a closed set called the Julia set of $$f(z)$$.

The Julia set is always non-empty and uncountable, and it is infinitely thin (without interior points). It is left invariant by $$f(z)$$, and here the sequences of iteration behave chaotically (apart from a countable number of points whose sequence is finite). The Julia set can be a simple curve, but it is usually a fractal.

The mean theorem on complex iteration is:

Each of the Fatou domains has the same boundary

The common boundary is consequently the Julia set. This means that each point of the Julia set is a point of accumulation for each of the Fatou domains.

If there are more than two Fatou domains, it can be inferred that the Julia set must be a fractal, because each point of the Julia set has points of more than two different open sets infinitely close, but this is "impossible" since the plane is only two-dimensional.

Therefore, if one constructs $$f(z)$$ in a particular way, one can know that the Julia set is a fractal. This is the case for Newton iteration for solving an equation $$g(z) = 0$$. Here $$f(z) = z - g(z)/g'(z)$$ and the solutions (that can be found by iteration) belong to different Fatou domains (consisting of the points iterating to that solution). The first picture shows the Julia set for the Newton iteration for $$g(z) = z^{5} - 1$$. But a Julia set can be a fractal for other reasons, the next picture shows a Julia set for an iteration of the form $$1000(1 - z)/(8 - 4z + 2z^{2} - z^{3}) + c$$, and here there is only one Fatou domain.

The critical points
To begin with, one must find all the Fatou domains, and as a Fatou domain is determined by a single point in it, one must find a set of points such that each Fatou domain contains at least one of these. This is easily done, because:

Each of the Fatou domains contains at least one critical point of $$f(z)$$

A critical point of $$f(z)$$ is a (finite) point z satisfying $$f'(z) = 0$$, or z = ∞, if the degree d of $$f(z)$$ is at least two, or if $$f(z) = 1/g(z) + c$$ for some c and a rational function $$g(z)$$ satisfying this condition.

As it is presupposed that f(z) is rational, this means that there is only a finite number of Fatou domains.

Solutions to $$f'(z) = 0$$ can be found by Newton iteration: if z* is a solution, a point near z* is iterated towards z* by $$z \to z - f'(z)/f''(z)$$. Newton iteration can be applied on a large number of regularly situated points in the plane, and the different critical points registered (if the start point belongs to the Julia set of the iteration, it doesn't necessarily lead to a solution, likewise, not all critical points will be necessarily be found, but that does not matter).

This article will only deal with the attracting Fatou domains: a neutral domain cannot be coloured in a natural way, and unless $$f(z)$$ is particularly chosen, it is improbable in practice that the Fatou domain is neutral.

The different attracting Fatou domains can be found in the following way: We iterate each of the critical points a large number of times (or stop if the iterated point is numerically larger than a given large number), so that the iterated point z* is very near its terminus, which is possibly a cycle containing ∞, and we continue the iteration until the point is very near z* again. The number r(z*) of iterations needed for this is the order of the cycle. Hereafter we register the different cycles by removing the points z* belonging to a formerly registered cycle. This set of points corresponds to the set of Fatou domains.

A Fatou domain can contain several critical points, and from the number of the critical points in the Fatou domains we can say something about the connectedness of the Julia set: the fewer critical points in the Fatou domains, the more connected the Julia set.

The attraction of the cycle
In order to colour a Fatou domain in a natural and smooth way, besides the order of the cycle one must know its attraction $$\alpha$$ - a real number > 1:

For iteration towards an attracting cycle of order r, we have that if z* is a point of the cycle, then $$f(f(\cdots f(z{*}))) = z{*}$$ (the r-fold composition), and the attraction is the number $$\alpha = 1/|(d(f(f(\cdots f(z))))/dz)_{z=z{*}}|$$. Note that $$(d(f(f(\cdots f(z))))/dz)_{z=z{*}}$$ = the product of $$f'(z_i)$$ for the r points of the cycle. If w is a point very near z* and $$w_r$$ is w iterated r times, we have that $$\alpha = \lim_{w\to z{*}} |w - z{*}|/|w_r - z{*}|$$.

However, this number $$\alpha$$ can be ∞, namely if the cycle contains a critical point (meaning that the critical point is iterated into itself after r iterations), and in this case the Fatou domain (and the cycle) is called super-attracting. We now set $$\alpha = \lim_{w\to z{*}} \log|w_r - z{*}|/\log|w - z{*}|$$ or $$\alpha = \lim_{w\to\infty} \log|w_r|/\log|w|$$ if z* = ∞.

In the last case, that is, ∞ being a critical point and belonging to the cycle, we have |d| > 1 and $$\alpha = |d|^r$$. In this case we assume that ∞ is a fixed point (r = 1), so that d ≥ 2 and $$\alpha = d$$ (we thus ignore a function such as $$1/(z - c)^{2} + c$$, for which the attracting cycle is {c, ∞}).

In the case of using Newton iteration to solve an equation $$g(z) = 0$$ (so that $$f(z) = z - f(z)/f'(z)$$), the Fatou domains (containing a solution) are super-attracting, and $$\alpha = 2$$ (if the solution is not a multiple root).

Colouring the Fatou domains
Our method of colouring is based on the real iteration number, which is connected with the potential function $$\phi(z)$$ of the Fatou domain. In the three cases the potential function is given by:


 * $$\phi(z) = \lim_{k\to\infty} 1/(|z_{kr} - z{*}|\alpha^k)$$ (non-super-attraction)
 * $$\phi(z) = \lim_{k\to\infty} \log(1/|z_{kr} - z{*}|)/\alpha^{k}$$ (super-attraction)
 * $$\phi(z) = \lim_{k\to\infty} \log|z_k|/d^{k}$$ (d ≥ 2 and z* = ∞)

The real iteration number depends on the choice of a very small number $$\epsilon$$ (for iteration towards a finite cycle) and a very large number N (e.g. 10100, for iteration towards ∞), and the sequence generated by z is set to stop when either $$|z_k - z{*}| < \epsilon$$ for one of the points z* or $$|z_k| > N$$, or when a chosen maximum number M of iterations is reached (which means that we have hit the Julia set, although this is not very probable).

If the cycle is not a fixed point, we must divide the iteration number k by the order r of the cycle, and take the integral part of this number.

If we calculate $$\phi(z)$$ for the k that stops the iteration, and replace $$|z_k - z{*}|$$ or $$|z_k|$$ by $$\epsilon$$ or N, respectively, we must replace the iteration number k by a real number, and this is the real iteration number. It is found by subtracting from k a number in the interval [0, 1[, and in the three cases this is given by:


 * $$\log(\epsilon/|z_k - z{*}|)/\log(\alpha)$$ (non-super-attraction)
 * $$\log(\log|z_k - z{*}|/\log(\epsilon))/\log(\alpha)$$ (super-attraction)
 * $$\log(\log|z_k|/\log(N))/\log(d)$$ (d ≥ 2 and z* = ∞)

In order to do the colouring, one needs a selection of cyclic colour scales: either pictures or scales constructed mathematically or manually by choosing some colours and connecting them in a continuous way. If the scales contain H colours (e.g. 600), we number the colours from 0 to H &minus; 1. Then the real iteration number is multiplied by a number determining the density of the colours in the picture. The integral part of this product modulo H corresponds to the color. The density is in reality the most important factor in the colouring and if its judicious choice can result in a nice play of colours. However, some fractal motives seem to be impossible to colour satisfactorily and in these cases we have to leave the picture in black-and-white or in a moderate grey tone.

Colouring the Julia set
In order to get a nice picture, we must also colour the Julia set, since otherwise the Julia set is only visible through the colouring of the Fatou domains, and this colouring changes vigorously near the Julia set, giving a muddy look (it is possible to avoid this by choosing the colour scale and the density carefully). A point z belongs to the Julia set if the iteration does not stop, that is, if we have reached the chosen maximum number of iterations, M. But as the Julia set is infinitely thin, and as we only perform calculations for regularly situated points, in practice we cannot colour the Julia set in this way. But happily there exists a formula that (up to a constant factor) estimates the distance from the points z outside the Julia set to the Julia set. This is associated to a Fatou domain, and the number given by the formula is the more correct the closer we come to the Julia set, so that the deviation is without significance.

The distance function is the function $$\delta(z) = \phi(z)/|\phi^'(z)|$$, whose equipotential lines must lie approximately regularly. In the formula appears the derivative $$z'_k$$ of $$z_k$$ with respect to z. But as $$z_k = f(f(\cdots f(z)))$$ (the k-fold composition), $$z'_k$$ is the product of the numbers $$f'(z_i)$$ (i = 0, 1, ..., k &minus; 1), and this sequence can be calculated recursively by $$z'_{k+1} = f'(z_k)z'_k$$ and $$z'_0 = 1$$ (before the calculation of the next iteration $$z_{k+1} = f(z_k)$$). In the three cases we have:


 * $$\delta(z) = \lim_{k\to\infty} |z_{kr} - z{*}|/|z'_{kr}|$$ (non-super-attraction)
 * $$\delta(z) = \lim_{k\to\infty} \log|z_{kr} - z{*}||z_{kr} - z{*}|/|z'_{kr}|$$ (super-attraction)
 * $$\delta(z) = \lim_{k\to\infty} \log|z_k||z_k|/|z'_k|$$ (d ≥ 2 and z* = ∞)

If this number (calculated for the last iteration number kr - to be divided by r) is smaller that a given small number, we colour the point z dark-blue, for instance.

Lighting-effect
We can make the colouring more attractive for some motives by using lighting-effect. We imagine light coming from a given direction (determined by two angles). For each point we perform the calculations of the real iteration number for two points more, very close to this, one in the x-direction and the other in the y-direction. The three values of the real iteration number form a little triangle in the space, and we form the scalar product of the normal vector to the triangle by the unit vector in the direction of the light. After multiplying the scalar product by a number determining the effect of the light, we add this number to the real iteration number (multiplied by the density number).

Instead of the real iteration number, we can also use the corresponding real number constructed from the distance function. The real iteration number usually gives the best result. Using the distance function is equivalent to forming a fractal landscape and looking at it vertically downwards.

The effect is usually best when $$f(z)$$ is a polynomial and when the cycle is super-attracting, because singularities of the potential function or the distance function give bulges, which can spoil the colouring. In this article lighting-effect from the real iteration number is used in the top picture, in the Julia set for $$\sin(z) + c$$ and in all the pictures for non-complex iteration.

The field lines
In a Fatou domain (that is not neutral) there is a system of lines orthogonal to the system of equipotential lines, and a line of this system is called a field line. If we colour the Fatou domain according to the iteration number (and not the real iteration number), the bands of iteration show the course of the equipotential lines, and so also the course of the field lines. If the iteration is towards ∞, we can easily show the course of the field lines, namely by altering the colour according to whether the last point in the sequence is above or below the x-axis, but in this case (more precisely: when the Fatou domain is super-attracting) we cannot draw the field lines coherently (because we use the argument of the product of $$f'(z_i)$$ for the points of the cycle). For an attracting cycle, the field lines issue from the points of the cycle and from the (infinite number of) points that iterate into a point of the cycle. And the field lines end on the Julia set in points that are non-chaotic (that is, generating a finite cycle). For the drawing of the field lines see the article Julia set. In the picture above, the function is of the form $$z/2 + 1/(z - z^{3}/6) + c$$ and we have only coloured a single Fatou domain.

The Mandelbrot set
In appearance a Julia set can go from one extreme to the other. And if we have a family of functions containing a complex parameter c, we will observe that by far the majority of c-values the Julia set is completely without interest. In fact, the attractive Julia sets are extremely rare.

And these Julia sets are just found by considering a family of iterations and from this constructing a set in the plane that can serve as an atlas over the Julia sets, in the sense that if we find an interesting locality in this set, we can be certain that some part of the pattern at this place will be reflected in the (self-similar) structure of the Julia sets associated to the points here. Such a set is called a Mandelbrot set.

Therefore, if we have a function $$f(z)$$, we introduce a complex parameter c in it, usually by addition: $$f(z) + c$$.

Construction of the Mandelbrot set
The construction of the Mandelbrot set is based on the choice of two critical points $$zc_1$$ and $$zc_2$$ for the function $$f(z)$$: The Mandelbrot set (associated to the family $$f(z) + c$$ and the critical points $$zc_1$$ and $$zc_2$$) consists of the complex numbers c, such that the sequences of iteration (by $$f(z) + c$$) starting in $$zc_1$$ and $$zc_2$$, respectively, do not have the same terminus. This set is usually coloured black.

Colouring the domain outside the Mandelbrot set
That a point c is lying outside the Mandelbrot set, means that the second critical point $$zc_2$$ is lying in the same Fatou domain (for the iteration $$f(z) + c$$) as the first critical point $$zc_1$$, and we can give c the colour of the point $$zc_2$$ in this Fatou domain.

In order to draw the Mandelbrot set and colour the domain outside it, we must have chosen a maximum iteration number M, a very small number $$\epsilon$$ (for iteration towards a finite cycle) and a very large number N (for iteration towards ∞).

If $$zc_1$$ = ∞ (and d ≥ 2, so that ∞ is a critical point and a (super-attracting) fixed point), of course we need not iterate $$zc_1$$: we iterate $$zc_2$$ (by $$f(z) + c$$) and if $$|z_k| > N$$ for some iteration number k < M, then c is lying outside the Mandelbrot set, and we colour c in the same way as we have coloured a z in a Fatou domain containing ∞. If we have reached the maximum iteration number M, we regard c as belonging to the Mandelbrot set.

If $$zc_1$$ is a finite critical point and if the iteration of $$zc_1$$ (by $$f(z) + c$$) is running to the maximum number of iterations M is reached, the terminus is most probably a finite attracting cycle that is not super-attracting (if not, there can be a fault in the colour of the pixel, but this is without significance in practice). If the last point of this iteration is z*, z* belongs to the cycle, but we must know its order and its attraction. Therefore we continue the iteration: starting in z* and running until $$|z_k - z*| < \epsilon$$, then the number of iterations needed for this is the order r of the cycle, and we calculate the attraction $$\alpha$$ in the same way as before: 1/$$\alpha$$ is the product of the numbers $$|f'(z_i)|$$ for the r points of the cycle. We hereafter iterate $$zc_2$$ (by $$f(z) + c$$), and stop when $$|z_k - z*| < \epsilon$$. If this iteration runs until the maximum number of iterations M is reached, we regard c as belonging to the Mandelbrot set. If $$|z_k - z*| < \epsilon$$ for k < M, we colour c according to k, or rather, the corresponding real iteration number, which is found in the same way as for a Fatou domain, by dividing k by r (and taking the integral part) and from this number subtracting $$\log(\epsilon/|z_k - z*|)/\log(\alpha)$$.

If the cycle contains ∞, that is, if the iteration of $$zc_1$$ is stopped by $$|z_k| > N$$ for k < M, we let ∞ be the chosen point of the cycle, and we continue the iteration until we again have $$|z_k|$$ > N, then the number of iterations needed to do this is the order of the cycle. We then iterate $$zc_2$$ (by $$f(z) + c$$), and stop when $$|z_k|$$ > N. If this iteration runs until the maximum number of iterations M is reached, we regard c as belonging to the Mandelbrot set. If $$|z_k| > N$$ for k < M, we colour c according to k, or rather, the corresponding real iteration number, which is found in the same way as for a Fatou domain, by dividing k by r (and taking the integral part) and from this number subtracting $$\log(\log|z_k|/\log(N))/\log(|d|^{r})$$.

Colouring the boundary of the Mandelbrot set
That a point c is lying outside the Mandelbrot set, means that the second critical point $$zc_2$$ is lying in the same Fatou domain (for the iteration $$f(z) + c$$) as the first critical point $$zc_1$$, and the estimation of the distance from $$zc_2$$ to the Julia set, in this Fatou domain, is an estimation of the distance from c to the boundary of the Mandelbrot set. So, the boundary of the Mandelbrot set can be coloured in the same way as a Julia set, but now the derivative of $$z_k$$ is not with respect to z, but with respect to c.

If we set $$g(z) = f(z) + c$$, we have $$z_k = g(g(...g(z)))$$ (the k-fold composition)(the start value z is first $$zc_1$$ and then $$zc_2$$), and we find the derivative $$z'_k$$ of $$z_k$$ with respect to c by recursion: we have $$z'_{k+1} = f'(z_k)z'_k + 1$$, and we find $$z'_k$$ successively by performing this calculation for each iteration, starting with $$z'_0$$ = 0, together with (and before) the calculation of the next iteration value $$z_{k+1} = f(z_k) + c$$, starting with z = $$zc_1$$ and $$zc_2$$, respectively.

As well as finding the point z* in the cycle by iterating $$zc_1$$ M times, we now also calculate the derivative z*' of z* with respect to c, and when iterating $$zc_2$$ towards the cycle, we now also calculate the derivative $$z'_k$$ of $$z_k$$ with respect to c. The formulas for $$\delta(z)$$ are for the two cases:


 * $$\delta(z) = \lim_{k\to\infty} |z_{kr} - z{*}|/|z'_{kr} - z{*}'|$$ (non-super-attraction)
 * $$\delta(z) = \lim_{k\to\infty} \log|z_k||z_k|/|z'_k|$$ (d ≥ 2 and z* = ∞)

When the value of this number for the last iteration number is smaller than a given small number, we colour the point c dark-blue, for instance.

Why the Mandelbrot set serves as an atlas of the Julia sets
If we choose a point c near the boundary of the Mandelbrot set, then the Julia set for $$f(z) + c$$ will have a (self-similar) structure that has some features in common with the Mandelbrot set at that locality. In the simple case $$f(z) = z^{2} + c$$ (the usual Mandelbrot set), the structure of the Julia set for c is exactly the same as the local structure of the Mandelbrot at c, but this is usually not the case for general rational functions, only that the structure of the Julia set reflects the local structure of the Mandelbrot set.

Why this? When c is inside the Mandelbrot set, the sequence generated by $$zc_2$$ does not converge to the terminus of the sequence generated by $$zc_1$$, and this means that the two Fatou domains containing $$zc_1$$ and $$zc_2$$, respectively, are different. But when we let c pass over the boundary of the Mandelbrot set, the two sequences now have the same terminus, so that the two Fatou domains become identical. Because one of the Fatou domains has now disappeared, we can infer that the Julia set for $$f(z) + c$$ must change in a significant way (it becomes less connected).

It is only when c is near the boundary of the Mandelbrot set that we can predict something about the Julia set, but as there usually are several critical points, we can choose another pair and draw a new Mandelbrot set. Note that if we use two finite critical points and if we invert these, then the black is unaltered, but the colouring and the boundary can alter: the colour is determined by the value in $$zc_2$$ of the potential function of the Fatou domain for c containing $$zc_1$$. In order to get the most aesthetic colouring, we must use the value of the potential function in one and the same point (the second critical point) as c varies. When c passes the boundary of the Mandelbrot set, a Fatou domain disappears, but it is only when the second critical point leaves the Fatou domain, that we get the natural colouring and the boundary.

The usual Mandelbrot set
For the family $$f(z) = z^{2} + c$$, there are two critical points, 0 and ∞, and therefore only one Mandelbrot set. This set consists of the points c such that the sequence generated by 0 (by $$z^{2} + c$$) remains bounded. For c outside the Mandelbrot set the sequence converges to ∞, and we can colour according to the number of iterations needed to bring the points outside a large circle with centre in origo. If we only colour according to the iteration number and if we do not draw the boundary, this circle needs only to have radius 2.

For this family, the Julia set for c has two Fatou domains when c is inside the Mandelbrot set, and one when c is outside. When c is inside the Mandelbrot set, the Julia set is connected, and when c is outside, the Julia set is disconnected (and more than that: totally disconnected - a dust cloud - because of the self-similarity). For c belonging to the boundary, the Julia set is connected, but it does not enclose an interior Fatou domain (this can be regarded as degenerated): the Julia set is just a fractal line with a "nose" and a "tail" and a "spine" connecting these two points.

The usual Mandelbrot set consists of an infinite system of cardoids and circles, all lying outside each other and some touching. When we zoom in, we find a swarm of mini-mandelbrots. Such mini-mandelbrots (possibly deformed) appear in the Mandelbrot set for every complex (differentiable) function, even for transcendental functions (see the picture below).

The different types of Mandelbrot and Julia sets


Of all Mandelbrot sets the usual is the one that possesses most localities of beauty. All other Mandelbrot sets are more or less ugly in their entirety, especially when the function is not a polynomial. In return, it is in such Mandelbrot sets that we can be lucky enough to find the most interesting and original shapes.

When we draw the Mandelbrot set for different rational functions, of course some types of shape will recur, and it should be possible to classify these shapes. We cannot refer the any work in this direction, we can only state the most elementary differentiation:

1. d > 1 (m > n + 1). Then ∞ is a critical point and a super-attracting fixed point, and we usually use this as the first of the two critical points. For $$f(z) = (z^{2} + z^{4}/2)/(2 - z^{2}/20) + c$$ (and critical point 0), we can find this motif in the Mandelbrot set (top picture):

2. d = 1 (m = n + 1). In this case $$f(z)$$ is usually constructed from the Newton procedure for solving an equation $$g(z) = 0$$: $$f(z) = z - g(z)/g'(z)$$. The critical points are just the solutions to $$g(z) = 0$$, and we choose two having the largest distance from each other. For $$g(z) = z^{4} - 1$$ and thus $$f(z) = (1 + 3z^{4})/(4z^{3})$$ we can find this motif in the Mandelbrot set (middle picture):

3. d < 1 (m < n + 1). In this case we usually use two finite critical points, and as the critical points are lying symmetrically around the x-axis (if $$f(z)$$ has real coefficients), we let the pair consist of conjugate numbers (of largest distance). We let the family be $$f(z) = (1 - z^{2})/(z - 0.01z^{2} + 0.004z^{3}) + c$$, and we zoom in at the place where the most interesting things seem to be (bottom picture). We choose three points on the boundary and draw their Julia sets. First a point on the thin tangent line passing through the sea horse valley. Then a point in one of the holes inside the upper black. The last point presupposes that we invert the critical points, so that we can see a part of the boundary that is not visible on this picture of the Mandelbrot set. This boundary forms a continuation downwards of the indicated vertical line in the centre.

The drawing Mandelbrot and Julia sets in practice
A Julia set for a rational complex function is so well-defined and natural that, like with some other mathematical concepts, we are inclined to say that it belongs to nature: if they have computers in another world, they will also definitely have Julia sets. Also the definition of a Mandelbrot set is simple and obvious, and the drawing procedure must necessarily be in this way: we enter the coefficients of the two polynomials in some way, and then either some pairs of critical points are found automatically or a pair is chosen graphically by clicking in a picture where all the critical points are shown. Hereafter the Mandelbrot set appears, and we can zoom in and alter the colouring. We go to the Julia sets by pressing a key so that the point in the centre of the window can be moved by the arrows, and when we have chosen a point (usually on the boundary of the Mandelbrot set), the procedure for the Julia set is exactly the same as that for the Mandelbrot set.

When you draw a large picture, you ought to draw it at least twice as large as intended, and then reduce it so that the boundary is no longer of only one colour. This will lessen the often sharp character of the boundary and it will remove dots arising from impossible calculations.

Julia and Mandelbrot sets for transcendental functions
For a transcendental complex function, such as $$\sin(z), \cos(z), \exp(z), \dots$$, which must be assigned degree ∞ and which has ∞ as an attracting fixed point, the potential function for the Fatou domain containing ∞ does not exist, and therefore the colouring cannot be made smooth in the usual way. Besides this, it is possible that the status of ∞ as an attracting fixed point is ambiguous.

This is the case for $$\sin(z)$$ and $$\cos(z)$$. $$\sin(z)$$ can be defined by $$\sin(x + iy) = \sin(x)\cosh(y) + i\cos(x)\sinh(y)$$, and we see from this formula, that if we go towards ∞ along a vertical line, the value grows (exponentially) to ∞, but if we go towards ∞ along a horizontal line, the value remains bounded. As an iteration of z by $$\sin(z) + c$$ can be small when z has an arbitrarily high y-value (namely if $$\cos(x)$$ is near 0), the inner Fatou domains extend towards ∞ in the vertical direction, and also in the horizontal direction, because of the periodicity. The same applies therefore for the Julia set. The Fatou domain containing ∞ must here be defined as the Fatou domain containing points having arbitrarily large y-values, but this Fatou domain is not an open set: it has no interior points. In the colouring it is therefore inseparable from the Julia set, which consists of infinitely dense lying threads. So, if there are no inner Fatou domains, the Julia set is lying densely in the plane, implying that the whole plane should be coloured as the boundary. Nevertheless, the computer gives us a non-trivial picture (top picture).

The reason is that we are forced to use a relatively small radius of the large circle determining the stopping of the iteration, owing to the exponential growth of $$\sin(z)$$ in the y-direction. Therefore the sequences of iteration stop after only few iterations, and we colour on the basis of the number of iterations. As the colour of a point c outside the Mandelbrot set is the colour of the (second) critical point of the Fatou domain for c containing ∞, the domain outside the Mandelbrot set is, like the outer Fatou domain, without interior points: it is interwoven with infinitely lying threads. This wire mesh makes up a continuation of the usual boundary, which is unaffected by the phenomenon, as the distance function is unaffected by the nature of the function. For a rational function, the boundary consists of the points such that the associated Julia set contains the (second) critical point. However, for a transcendental function this set can be larger than the boundary constructed from the distance function, and in our case it lies densely in the domain outside the interior of the Mandelbrot set. Nevertheless we get a colouring, because the iterations stop early. We are here in the Sea Horse Valley of a mini-mandelbrot of the Mandelbrot set for $$\sin(z) + c$$ (middle picture).

For iteration towards finite cycles, the Julia sets look like those for rational functions. But it can happen that there are small circles in the picture of only one colour, because it is impossible here, at a specific step in the iteration, to calculate the next value of the transcendental function in the formula. The Mandelbrot set for $$1/\cos(z) + c$$ has a look that is typical for the rational functions where the iterations are towards finite cycles (bottom picture).

As $$\cos(z)$$ is periodic with period $$2\pi$$, the Mandelbrot set and the Julia sets for $$1/\cos(z)$$ will repeat themselves along the x-axis. The section in the picture is of width $$2\pi$$. The critical points for $$1/cos(z)$$ are the solutions to the equation $$\sin(z) = 0$$, that is, the points $$n \pi$$ (n = 0, ±1, ±2, ...). We have used 0 and $$\pi$$ to construct the Mandelbrot set. As $$cos(z)$$ has power series expansion $$1 - z^{2}/2! + z^{4}/4! - z^{6}/6! + z^{8}/8! - \cdots $$ (where n! = 1×2×...×n), we can get rational approximations to the Mandelbrot set and the Julia sets for $$1/\cos(z)$$ by restricting this series.

Julia and Mandelbrot sets for non-complex functions
That our mapping $$f(z)$$ from the plane into itself is differentiable as a complex function, means that it is differentiable as a real function - that is, that its two components $$f_x(x, y)$$ and $$f_y(x, y)$$ are differentiable - and that these two components satisfy the Cauchy–Riemann differential equations:


 * $$\frac{\partial}{\partial{x}}f_x = \frac{\partial}{\partial{y}}f_x$$

and
 * $$\frac{\partial}{\partial{x}}f_y = -\frac{\partial}{\partial{y}}f_y$$

if so, these two numbers are the real and imaginary part of $$f'(z)$$, respectively.

It is this condition that causes the characteristic features of the Mandelbrot and Julia sets for complex iteration. The usual family of iterations $$z^{2} + c$$ can (in coordinate form) be written $$(x, y)$$ → $$(x^{2} - y^{2}, 2xy) + (u, v)$$ (if c = u + iv), and if we here replace the y-coordinate of the function, that is 2xy, by 2.05xy, the shapes in the Sea Horse Valley become distorted:

This thread-like and tattered look is typical for the real - or non-complex - fractals. For a function which is not, as in this case, the result of a mild interference in a complex function, the picture is often very chaotic, and the colouring can be impossible at most places, because our method of colouring presupposes that the sequences of iteration converge to a finite cycle, and for a non-complex iteration the terminus need not be a finite set. The terminal set is now called an attractor, and attractors can have very surprising shapes. Because of this, such an attractor is known as a strange attractor.

The fact that the two coordinate functions are not presupposed to be connected (by the Cauchy-Riemann equations) implies partly that a point of a Julia set is no longer necessarily a point of accumulation for each of the Fatou domains, and partly that a Julia set can have different character of connectedness along two directions orthogonal to one another. For instance the Julia set can consist of a system of threads lying infinitely close. If so, it is connected when one goes along the threads, and disconnected when one goes across this direction. Within each of the Fatou domains the sequences of iteration will converge to - be attracted by - one and the same attractor. The interesting attractors are relatively rare and most attractors are - as in the complex case - only finite cycles, or they consist merely of a number of separated pieces of curves, or they are quite the opposite and completely confused, filling up almost all the Fatou domain.

The Mandelbrot set
In order to find interesting Julia sets and attractors, we must construct a Mandelbrot set. We assume here that our function $$f(x, y)$$ is composed of two real second-degree polynomials $$p(x, y)$$ and $$q(x, y)$$: $$f(x, y) = p(x, y) + iq(x, y)$$. We have first to choose two critical points. In the complex case, these are the solutions to the equation $$f'(z) = 0$$ (or z = ∞), and if our mapping (being composed of second-degree polynomials) were complex differentiable, there would only have been a single (finite) critical point, which could be calculated automatically. But if the function is not complex differentiable, there can be an infinity of points satisfying the condition of being a critical point.

For a general differentiable mapping $$g(x, y)$$ from the plane into itself, the derivative $$g'(x, y)$$ is a 2x2 matrix, namely composed of these four numbers:


 * $$\frac{\partial}{\partial{x}}g_x(x, y)$$  $$\frac{\partial}{\partial{y}}g_x(x, y)$$


 * $$\frac{\partial}{\partial{x}}g_y(x, y)$$  $$\frac{\partial}{\partial{y}}g_y(x, y)$$

That the Cauchy–Riemann equations are satisfied, means that this matrix corresponds to multiplication by a complex number, namely $$g'(z)$$. That $$g'(x, y)$$ is regarded as degenerated, means that its determinant$$|g'(x, y)|$$ vanishes:

$$(\partial g_x(x, y)/\partial{x})(\partial g_y(x,y)/\partial{y}) - (\partial g_x(x,y)/\partial{y})(\partial g_y(x,y)/\partial{x}) = 0$$.

For our function $$f(x, y)$$, composed of two second-degree polynomials, $$|g'(x, y)|$$ is a second-degree polynomial, and therefore its zeros form a conic section: an ellipse, a parabola or a hyperbola. Besides this curve of critical points, the point ∞ also satisfies the condition of being a critical point. We choose ∞ as the first of the critical points, and a point $$(zc_x, zc_y)$$ on the conic section as the other.

The Mandelbrot set for the family of iterations (x, y) → f(x, y) + (u, v) is the set of points (u, v) such that if we iterate $$(zc_x, zc_y)$$, the sequence does not grow towards ∞. The domain outside the Mandelbrot set can be coloured in the same way as before. In this simple case, where the iterations are towards a fixed point (namely ∞), we can (by means of matrix calculations) colour smoothly and draw the boundary. Let us set $$p(x, y) = xy$$ and $$q(x, y) = y - x^2$$, then the determinant of the derivative is $$y + 2x^{2}$$, so that the critical system is the parabola $$y = -2x^{2}$$. If we choose (0, 0), the Mandelbrot set looks like this:

The Julia sets
In our simple case, where ∞ is a critical point, the colouring of the Fatou domain containing ∞ is, like the colouring outside the Mandelbrot set, without problems, and we can also draw the boundary of this Fatou domain. But besides this Fatou domain, there can now be an infinity of Fatou domains and these are not necessarily open sets. A Fatou domain is a set of points having the same attractor, and each Fatou domain contains a critical point. If we therefore iterate all the points of the conic section, we get all the attractors.

If the attractor of a Fatou domain is not a finite cycle, we cannot colour the domain in a natural way, we colour it black and draw its attractor. This is done by iterating each point of the Fatou domain: first a large number of times without drawing, and then a large number of times where the pixel is coloured white, for instance. As the attractors for the different points in the same Fatou domain are the same, we can stop this drawing when we can see that no new attractor appears.

If in the above Mandelbrot set we choose a point in the upper part a good distance from the centre line and a little bit inside the Mandelbrot set, we get this Julia set (first picture).

The Julia set is the complement to the union of the Fatou domains. In the complex case we have that if there are only few critical points in the Fatou domains, this indicates that the Julia set is "most possible" connected. This rule is also valid for a non-complex iteration: the character of the intersection of the Julia set with the critical system indicates the character of the connectedness of the Julia set. Therefore, when the Julia set and the Fatou domains run as threads, we have that the nearer the angle of intersection with the Julia set is to a right angle, the more regular is the course of the Fatou domains at that locality.

If in the above Mandelbrot set we choose a point near the centre line and just outside the Mandelbrot set, the Julia set becomes disconnected, but as it intersects the critical system in angles that are near the right angle, it does not become a cloud of dust, as in the complex case, but it becomes only disconnected in the one direction, in the other it runs as connected threads (second picture). Even the most disconnected Julia sets consist of threads in this simple case (third picture).

When we have found a usable locality in the Mandelbrot set, it is still rather difficult to find a point whose inner Fatou domain has a fine attractor. The point must not lie too near the boundary, for then the attractor is too chaotic and difficult to draw, and when the point is too far inside the black, the attractor will be more or less trivial. It is only at few places and at a certain distance from the boundary that you can find attractive attractors, and their forms vary swiftly when the point is moved.

If we choose trivial functions, for instance $$p(x, y) = x^{2}$$ and $$q(x, y) = y^{2}$$, we can find trivial Julia sets and extraordinary (strange?) attractors (fourth picture).