# Multibrot Set

> Drag a slider to change the power d of the Multibrot set, the fractal of z → z^d + c, from 2 to 8, and see its symmetry change. Edit the equation.

A Multibrot set uses the iteration of the Mandelbrot set with another power: the map is $z \to z^d + c$, and $c$ is in the set when the iteration does not escape to infinity. Change $d$ to go from the Mandelbrot set at $d = 2$ to a set with more parts at $d = 8$. At a whole number $d$, the set has a rotational symmetry of order $d - 1$: $d = 3$ gives two parts and $d = 5$ gives four.

The power is a real number, so the function $M$ of the document's prelude uses the polar form on real numbers. With $s = a^2 + b^2$, it calculates $r = s^{d/2}$ and $w = d\arctan(b, a)$, and then $a \to r\cos(w) + p$ and $b \to r\sin(w) + q$. Between two whole numbers, the angle $w$ has a jump where $z$ crosses the negative real axis, so the picture has straight cuts that are not in the sets of whole powers.

$M$ gives the escape count of a point divided by 128, and 1 for a point that does not escape in 128 steps. To make the count continuous, the test for the escape is $|z|^2 > 4096$. This does not change the set, because a point with $|z| > 2$ always escapes for $d \ge 2$. The count is then $n + 1 - \ln(\ln(|z|^2) / \ln 4096) / \ln d$. The loop stops when the point escapes, so only a point that does not escape does all 128 steps.

- [Open the interactive version](https://graph-paper.io/showcase/en/multibrot)
- [Learn more on Wikipedia](https://en.wikipedia.org/wiki/Multibrot_set)
