# Multibrot set

In mathematics, a Multibrot set is the set of values in the complex plane whose absolute value remains below some finite value throughout iterations by a member of the general monic univariate polynomial family of recursions. The name is a portmanteau of multiple and Mandelbrot set. The same can be applied to the Julia set, this being called Multijulia set.
    $z\mapsto z^{d}+c.\,$
where d ≥ 2. The exponent d may be further generalized to negative and fractional values.

## Examples

Sources:
The case of
    $d=2\,$
is the classic Mandelbrot set from which the name is derived.
The sets for other values of d also show fractal images when they are plotted on the complex plane.
Each of the examples of various powers d shown below is plotted to the same scale. Values of c belonging to the set are black. Values of c that have unbounded value under recursion, and thus do not belong in the set, are plotted in different colours, that show as contours, depending on the number of recursions that caused a value to exceed a fixed magnitude in the Escape Time algorithm.

### Positive powers

The example d = 2 is the original Mandelbrot set. The examples for d > 2 are often called multibrot sets. These sets include the origin and have fractal perimeters, with (d − 1)-fold rotational symmetry.
| z ↦ z$^2$ + c | z ↦ z$^3$ + c | z ↦ z$^4$ + c |
| z ↦ z$^5$ + c | z ↦ z$^6$ + c | z ↦ z$^{96}$ + c |
* z ↦ z$^{96}$ + c detail x40

### Negative powers

When d is negative the set appears to surround but does not include the origin, However this is just an artifact of the fixed maximum radius allowed by the Escape Time algorithm, and is not a limit of the sets that actually have a shape in the middle with an no hole (You can see this by using the Lyapunov exponent [No hole because the origin diverges to undefined not infinity because the origin {0 or 0+0i} taken to a negative power becomes undefined]). There is interesting complex behaviour in the contours between the set and the origin, in a star-shaped area with (1 − d)-fold rotational symmetry. The sets appear to have a circular perimeter, however this is an artifact of the fixed maximum radius allowed by the Escape Time algorithm, and is not a limit of the sets that actually extend in all directions to infinity.
| z ↦ z$^{−2}$ + c | z ↦ z$^{−3}$ + c | z ↦ z$^{−4}$ + c | z ↦ z$^{−5}$ + c | z ↦ z$^{−6}$ + c |

### Rendering along the exponent

An alternative method is to render the exponent along the vertical axis. This requires either fixing the real or the imaginary value, and rendering the remaining value along the horizontal axis. The resulting set rises vertically from the origin in a narrow column to infinity. Magnification reveals increasing complexity. The first prominent bump or spike is seen at an exponent of 2, the location of the traditional Mandelbrot set at its cross-section. The third image here renders on a plane that is fixed at a 45-degree angle between the real and imaginary axes.
| Multibrot rendered with real value along horizontal axis and exponent along vertical axis, imaginary value fixed at zero | Multibrot rendered with imaginary value on horizontal axis and exponent on vertical axis, real value fixed at zero | Multibrot rendered with exponent on vertical axis along a plane angled 45-degrees between the real and imaginary axes. |

## Rendering images

All the above images are rendered using an Escape Time algorithm that identifies points outside the set in a simple way. Much greater fractal detail is revealed by plotting the Lyapunov exponent, as shown by the example below. The Lyapunov exponent is the error growth-rate of a given sequence. First calculate the iteration sequence with N iterations, then calculate the exponent as
    $\lambda =\lim _{N\to \infty }{\frac {1}{N}}\ln |\mathbf {z} |$
and if the exponent is negative the sequence is stable. The white pixels in the picture are the parameters c for which the exponent is positive aka unstable. The colours show the periods of the cycles which the orbits are attracted to. All points colored dark-blue (outside) are attracted by a fixed point, all points in the middle (lighter blue) are attracted by a period 2 cycle and so on.

### Pseudocode

The complex value z has coordinates (x,y) on the complex plane and is raised to various powers inside the iteration loop by codes shown in this table. Powers not shown in the table can be obtained by concatenating the codes shown.
| z$^{−2}$ | z$^{−1}$ | z$^2$ (for Mandelbrot set) | z$^3$ | z$^5$ | z$^n$ |
| d=x^4+2*x^2*y^2+y^4 assert d != 0 xtmp = (x^2-y^2)/d+a y = -2*x*y/d+b x = xtmp | d=x^2+y^2 assert d != 0 x = x/d + a y= -y/d + b | xtmp=x^2-y^2 + a y=2*x*y + b x=xtmp | xtmp=x^3-3*x*y^2 + a y=3*x^2*y-y^3 + b x=xtmp | xtmp=x^5-10*x^3*y^2+5*x*y^4 + a y=5*x^4*y-10*x^2*y^3+y^5 + b x=xtmp | xtmp=(x*x+y*y)^(n/2)*cos(n*atan2(y,x)) + a y=(x*x+y*y)^(n/2)*sin(n*atan2(y,x)) + b x=xtmp |