After writing
my previous entry,
I noticed that the final equation is in fact just the negated log of
the Douady-Hubbard potential (assuming *n* is practically
infinite). (In the following I will use the binary logarithm
throughout, lg *x* = log_{2} *x*.)

I didn’t really understand this so I sought a more intuitive explanation.

Observe that when *z* is large,
*f*_{c}(*z*) is very close to
*f*_{0}(*z*). So in the following we can treat the
crinkly component *c* as insignificant.

So the double log gives us a sort of measure of distance in terms of
the number of iterations needed to get from *z* to
*z*_{n}.

Recall that

$\begin{array}{ccc}z& =& r{e}^{i\theta}\\ {z}^{p}& =& {r}^{p}{e}^{pi\theta}\end{array}$Hence the equations in *z* also apply to *r* = |*z*|,

When *z* is close to the set, *r* is slightly greater than
one (plus crinkles), so lg *r* is a small positive number, and
lg lg *r* is a large negative number. Hence the negation
to turn it into the equivalent of an iteration count.

The equation above also relates back to the definition of the electrostatic potential and our simplifying approximation, that is,

$\begin{array}{ccc}{\mathit{\phi}}_{c}\left(z\right)& \simeq & lgr\end{array}$Thinking about what happens when we finish iterating,

$\begin{array}{ccccccc}& & {r}_{n}& >& R& >& {r}_{n-1}\\ & & {r}_{n}& \simeq & {r}_{n-1}^{2}\\ {R}^{2}& >& {r}_{n}& >& R& & \end{array}$So lg lg *r*_{n} lies between two numbers
with a difference of one,

When lg lg *r*_{n} is subtracted from *n*, it
contributes a fractional part and a fixed offset determined by the
bail-out radius.

Finally, on a practical note I find that a better function for colouring pixels is to take the log again:

$\begin{array}{c}m=lg(n-lglg{r}_{n})\end{array}$The extra log gives the value a more uniform gradient so it cycles through the colours evenly, and it gets much closer to the set before it flies off to infinity so less of the picture suffers from aliasing. Even better, it retains these properties as you zoom in.