<s>
There	O
are	O
many	O
programs	O
and	O
algorithms	O
used	O
to	O
plot	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
and	O
other	O
fractals	B-Application
,	O
some	O
of	O
which	O
are	O
described	O
in	O
fractal-generating	B-Algorithm
software	I-Algorithm
.	O
</s>
<s>
These	O
programs	O
use	O
a	O
variety	O
of	O
algorithms	O
to	O
determine	O
the	O
color	O
of	O
individual	O
pixels	B-Algorithm
efficiently	O
.	O
</s>
<s>
The	O
simplest	O
algorithm	O
for	O
generating	O
a	O
representation	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
is	O
known	O
as	O
the	O
"	O
escape	O
time	O
"	O
algorithm	O
.	O
</s>
<s>
A	O
repeating	O
calculation	O
is	O
performed	O
for	O
each	O
x	O
,	O
y	O
point	O
in	O
the	O
plot	O
area	O
and	O
based	O
on	O
the	O
behavior	O
of	O
that	O
calculation	O
,	O
a	O
color	O
is	O
chosen	O
for	O
that	O
pixel	B-Algorithm
.	O
</s>
<s>
If	O
that	O
condition	O
is	O
reached	O
,	O
the	O
calculation	O
is	O
stopped	O
,	O
the	O
pixel	B-Algorithm
is	O
drawn	O
,	O
and	O
the	O
next	O
x	O
,	O
y	O
point	O
is	O
examined	O
.	O
</s>
<s>
For	O
values	O
within	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
,	O
escape	O
will	O
never	O
occur	O
.	O
</s>
<s>
The	O
higher	O
the	O
maximal	O
number	O
of	O
iterations	O
,	O
the	O
more	O
detail	O
and	O
subtlety	O
emerge	O
in	O
the	O
final	O
image	O
,	O
but	O
the	O
longer	O
time	O
it	O
will	O
take	O
to	O
calculate	O
the	O
fractal	B-Application
image	O
.	O
</s>
<s>
More	O
computationally	O
intensive	O
rendering	O
variations	O
include	O
the	O
Buddhabrot	B-Algorithm
method	O
,	O
which	O
finds	O
escaping	O
points	O
and	O
plots	O
their	O
iterated	O
coordinates	O
.	O
</s>
<s>
To	O
render	O
such	O
an	O
image	O
,	O
the	O
region	O
of	O
the	O
complex	O
plane	O
we	O
are	O
considering	O
is	O
subdivided	O
into	O
a	O
certain	O
number	O
of	O
pixels	B-Algorithm
.	O
</s>
<s>
To	O
color	O
any	O
such	O
pixel	B-Algorithm
,	O
let	O
be	O
the	O
midpoint	O
of	O
that	O
pixel	B-Algorithm
.	O
</s>
<s>
When	O
this	O
is	O
the	O
case	O
,	O
we	O
know	O
that	O
does	O
not	O
belong	O
to	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
,	O
and	O
we	O
color	O
our	O
pixel	B-Algorithm
according	O
to	O
the	O
number	O
of	O
iterations	O
used	O
to	O
find	O
out	O
.	O
</s>
<s>
Otherwise	O
,	O
we	O
keep	O
iterating	O
up	O
to	O
a	O
fixed	O
number	O
of	O
steps	O
,	O
after	O
which	O
we	O
decide	O
that	O
our	O
parameter	O
is	O
"	O
probably	O
"	O
in	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
,	O
or	O
at	O
least	O
very	O
close	O
to	O
it	O
,	O
and	O
color	O
the	O
pixel	B-Algorithm
black	O
.	O
</s>
<s>
In	O
pseudocode	B-Language
,	O
this	O
algorithm	O
would	O
look	O
as	O
follows	O
.	O
</s>
<s>
Here	O
,	O
relating	O
the	O
pseudocode	B-Language
to	O
,	O
and	O
:	O
</s>
<s>
and	O
so	O
,	O
as	O
can	O
be	O
seen	O
in	O
the	O
pseudocode	B-Language
in	O
the	O
computation	O
of	O
x	O
and	O
y	O
:	O
</s>
<s>
One	O
practical	O
way	O
,	O
without	O
slowing	O
down	O
calculations	O
,	O
is	O
to	O
use	O
the	O
number	O
of	O
executed	O
iterations	O
as	O
an	O
entry	O
to	O
a	O
palette	B-Data_Structure
initialized	O
at	O
startup	O
.	O
</s>
<s>
If	O
the	O
color	B-Data_Structure
table	I-Data_Structure
has	O
,	O
for	O
instance	O
,	O
500	O
entries	O
,	O
then	O
the	O
color	O
selection	O
is	O
nmod500	O
,	O
where	O
n	O
is	O
the	O
number	O
of	O
iterations	O
.	O
</s>
<s>
The	O
further	O
optimized	O
pseudocode	B-Language
for	O
the	O
above	O
is	O
:	O
</s>
<s>
Note	O
that	O
in	O
the	O
above	O
pseudocode	B-Language
,	O
seems	O
to	O
increase	O
the	O
number	O
of	O
multiplications	O
by	O
1	O
,	O
but	O
since	O
2	O
is	O
the	O
multiplier	O
the	O
code	O
can	O
be	O
optimized	O
via	O
.	O
</s>
<s>
It	O
is	O
common	O
to	O
check	O
the	O
magnitude	O
of	O
z	O
after	O
every	O
iteration	O
,	O
but	O
there	O
is	O
another	O
method	O
we	O
can	O
use	O
that	O
can	O
converge	O
faster	O
and	O
reveal	O
structure	O
within	O
julia	B-Language
sets	I-Language
.	O
</s>
<s>
Instead	O
of	O
checking	O
if	O
the	O
magnitude	O
of	O
z	O
after	O
every	O
iteration	O
is	O
larger	O
than	O
a	O
given	O
value	O
,	O
we	O
can	O
instead	O
check	O
if	O
the	O
sum	O
of	O
each	O
derivative	B-Algorithm
of	O
z	O
up	O
to	O
the	O
current	O
iteration	O
step	O
is	O
larger	O
than	O
a	O
given	O
bailout	O
value	O
:	O
</s>
<s>
It	O
is	O
possible	O
to	O
find	O
derivatives	B-Algorithm
automatically	O
by	O
leveraging	O
Automatic	B-Algorithm
differentiation	I-Algorithm
and	O
computing	O
the	O
iterations	O
using	O
Dual	O
numbers	O
.	O
</s>
<s>
Rendering	O
fractals	B-Application
with	O
the	O
derbail	O
technique	O
can	O
often	O
require	O
a	O
large	O
number	O
of	O
samples	B-Algorithm
per	O
pixel	B-Algorithm
,	O
as	O
there	O
can	O
be	O
precision	B-Algorithm
issues	O
which	O
lead	O
to	O
fine	O
detail	O
and	O
can	O
result	O
in	O
noisy	B-Algorithm
images	O
even	O
with	O
samples	B-Algorithm
in	O
the	O
hundreds	O
or	O
thousands	O
.	O
</s>
<s>
A	O
more	O
complex	O
coloring	O
method	O
involves	O
using	O
a	O
histogram	B-Algorithm
which	O
pairs	O
each	O
pixel	B-Algorithm
with	O
said	O
pixel	B-Algorithm
's	O
maximum	O
iteration	O
count	O
before	O
escape/bailout	O
.	O
</s>
<s>
The	O
first	O
pass	O
involves	O
calculating	O
the	O
iteration	O
counts	O
associated	O
with	O
each	O
pixel	B-Algorithm
(	O
but	O
without	O
any	O
pixels	B-Algorithm
being	O
plotted	O
)	O
.	O
</s>
<s>
These	O
are	O
stored	O
in	O
an	O
array	O
:	O
IterationCounts[x][y],	O
where	O
x	O
and	O
y	O
are	O
the	O
x	O
and	O
y	O
coordinates	O
of	O
said	O
pixel	B-Algorithm
on	O
the	O
screen	O
respectively	O
.	O
</s>
<s>
thumb|upright	O
=	O
0.65	O
|centerthumb|upright	O
=	O
0.65	O
|centerthumb|upright	O
=	O
0.65	O
|centerthumb|upright	O
=	O
0.65	O
|centerthumb|upright	O
=	O
0.65	O
|centerthumb|upright	O
=	O
0.65	O
|centerThe	O
top	O
row	O
is	O
a	O
series	O
of	O
plots	O
using	O
the	O
escape	O
time	O
algorithm	O
for	O
10000	O
,	O
1000	O
and	O
100	O
maximum	O
iterations	O
per	O
pixel	B-Algorithm
respectively	O
.	O
</s>
<s>
The	O
bottom	O
row	O
uses	O
the	O
same	O
maximum	O
iteration	O
values	O
but	O
utilizes	O
the	O
histogram	B-Algorithm
coloring	O
method	O
.	O
</s>
<s>
Notice	O
how	O
little	O
the	O
coloring	O
changes	O
per	O
different	O
maximum	O
iteration	O
counts	O
for	O
the	O
histogram	B-Algorithm
coloring	O
method	O
plots	O
.	O
</s>
<s>
Next	O
,	O
one	O
must	O
iterate	O
over	O
the	O
array	O
of	O
pixel-iteration	O
count	O
pairs	O
,	O
IterationCounts[][],	O
and	O
retrieve	O
each	O
pixel	B-Algorithm
's	O
saved	O
iteration	O
count	O
,	O
i	O
,	O
via	O
e.g.	O
</s>
<s>
After	O
each	O
pixel	B-Algorithm
's	O
iteration	O
count	O
i	O
is	O
retrieved	O
,	O
it	O
is	O
necessary	O
to	O
index	O
the	O
NumIterationsPerPixel	O
by	O
i	O
and	O
increment	O
the	O
indexed	O
value	O
(	O
which	O
is	O
initially	O
zero	O
)	O
--	O
e.g.	O
</s>
<s>
The	O
array	O
index	O
represents	O
the	O
number	O
of	O
pixels	B-Algorithm
that	O
reached	O
that	O
iteration	O
count	O
before	O
bailout	O
.	O
</s>
<s>
After	O
this	O
,	O
the	O
fourth	O
pass	O
begins	O
and	O
all	O
the	O
values	O
in	O
the	O
IterationCounts	O
array	O
are	O
indexed	O
,	O
and	O
,	O
for	O
each	O
iteration	O
count	O
i	O
,	O
associated	O
with	O
each	O
pixel	B-Algorithm
,	O
the	O
count	O
is	O
added	O
to	O
a	O
global	O
sum	O
of	O
all	O
the	O
iteration	O
counts	O
from	O
1	O
to	O
i	O
in	O
the	O
NumIterationsPerPixel	O
array	O
.	O
</s>
<s>
hue[x][y]	O
+	O
=	O
NumIterationsPerPixel[i]	O
/	O
total	O
/	O
*	O
Must	O
be	O
floating-point	B-Algorithm
division	O
.	O
</s>
<s>
as	O
an	O
index	O
to	O
a	O
color	O
palette	B-Data_Structure
.	O
</s>
<s>
However	O
,	O
it	O
creates	O
bands	O
of	O
color	O
,	O
which	O
,	O
as	O
a	O
type	O
of	O
aliasing	B-Error_Name
,	O
can	O
detract	O
from	O
an	O
image	O
's	O
aesthetic	O
value	O
.	O
</s>
<s>
The	O
algorithm	O
associates	O
a	O
real	O
number	O
with	O
each	O
value	O
of	O
z	O
by	O
using	O
the	O
connection	O
of	O
the	O
iteration	O
number	O
with	O
the	O
potential	B-Language
function	I-Language
.	O
</s>
<s>
where	O
zn	O
is	O
the	O
value	O
after	O
n	O
iterations	O
and	O
P	O
is	O
the	O
power	O
for	O
which	O
z	O
is	O
raised	O
to	O
in	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
equation	O
(	O
zn+1	O
=	O
znP+c	O
,	O
P	O
is	O
generally	O
2	O
)	O
.	O
</s>
<s>
We	O
multiply	O
the	O
real	O
number	O
by	O
a	O
fixed	O
real	O
number	O
determining	O
the	O
density	O
of	O
the	O
colors	O
in	O
the	O
picture	O
,	O
take	O
the	O
integral	O
part	O
of	O
this	O
number	O
moduloH	O
,	O
and	O
use	O
it	O
to	O
look	O
up	O
the	O
corresponding	O
color	O
in	O
the	O
color	B-Data_Structure
table	I-Data_Structure
.	O
</s>
<s>
//	O
Used	O
to	O
avoid	O
floating	B-Algorithm
point	I-Algorithm
issues	O
with	O
points	O
inside	O
the	O
set	O
.	O
</s>
<s>
//	O
Rearranging	O
the	O
potential	B-Language
function	I-Language
.	O
</s>
<s>
Typically	O
when	O
we	O
render	O
a	O
fractal	B-Application
,	O
the	O
range	O
of	O
where	O
colors	O
from	O
a	O
given	O
palette	B-Data_Structure
appear	O
along	O
the	O
fractal	B-Application
is	O
static	O
.	O
</s>
<s>
If	O
we	O
desire	O
to	O
offset	O
the	O
location	O
from	O
the	O
border	O
of	O
the	O
fractal	B-Application
,	O
or	O
adjust	O
their	O
palette	B-Data_Structure
to	O
cycle	O
in	O
a	O
specific	O
way	O
,	O
there	O
are	O
a	O
few	O
simple	O
changes	O
we	O
can	O
make	O
when	O
taking	O
the	O
final	O
iteration	O
count	O
before	O
passing	O
it	O
along	O
to	O
choose	O
an	O
item	O
from	O
our	O
palette	B-Data_Structure
.	O
</s>
<s>
Raising	O
a	O
value	O
normalized	O
to	O
the	O
range	O
 [ 0 , 1 ] 	O
to	O
a	O
power	O
n	O
,	O
maps	O
a	O
linear	O
range	O
to	O
an	O
exponential	O
range	O
,	O
which	O
in	O
our	O
case	O
can	O
nudge	O
the	O
appearance	O
of	O
colors	O
along	O
the	O
outside	O
of	O
the	O
fractal	B-Application
,	O
and	O
allow	O
us	O
to	O
bring	O
out	O
other	O
colors	O
,	O
or	O
push	O
in	O
the	O
entire	O
palette	B-Data_Structure
closer	O
to	O
the	O
border	O
.	O
</s>
<s>
where	O
i	O
is	O
our	O
iteration	O
count	O
after	O
bailout	O
,	O
max_i	O
is	O
our	O
iteration	O
limit	O
,	O
S	O
is	O
the	O
exponent	O
we	O
are	O
raising	O
iters	O
to	O
,	O
and	O
N	O
is	O
the	O
number	O
of	O
items	O
in	O
our	O
palette	B-Data_Structure
.	O
</s>
<s>
This	O
scales	O
the	O
iter	O
count	O
non-linearly	O
and	O
scales	O
the	O
palette	B-Data_Structure
to	O
cycle	O
approximately	O
proportionally	O
to	O
the	O
zoom	O
.	O
</s>
<s>
One	O
thing	O
we	O
may	O
want	O
to	O
consider	O
is	O
avoiding	O
having	O
to	O
deal	O
with	O
a	O
palette	B-Data_Structure
or	O
color	O
blending	O
at	O
all	O
.	O
</s>
<s>
One	O
can	O
compute	O
the	O
distance	O
from	O
point	O
c	O
(	O
in	O
exterior	O
or	O
interior	O
)	O
to	O
nearest	O
point	O
on	O
the	O
boundary	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
The	O
proof	O
of	O
the	O
connectedness	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
in	O
fact	O
gives	O
a	O
formula	O
for	O
the	O
uniformizing	O
map	O
of	O
the	O
complement	O
of	O
(	O
and	O
the	O
derivative	B-Algorithm
of	O
this	O
map	O
)	O
.	O
</s>
<s>
By	O
the	O
Koebe	O
quarter	O
theorem	O
,	O
one	O
can	O
then	O
estimate	O
the	O
distance	O
between	O
the	O
midpoint	O
of	O
our	O
pixel	B-Algorithm
and	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
up	O
to	O
a	O
factor	O
of	O
4	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
provided	O
that	O
the	O
maximal	O
number	O
of	O
iterations	O
is	O
sufficiently	O
high	O
,	O
one	O
obtains	O
a	O
picture	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
with	O
the	O
following	O
properties	O
:	O
</s>
<s>
Every	O
pixel	B-Algorithm
that	O
contains	O
a	O
point	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
is	O
colored	O
black	O
.	O
</s>
<s>
Every	O
pixel	B-Algorithm
that	O
is	O
colored	O
black	O
is	O
close	O
to	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
is	O
the	O
derivative	B-Algorithm
of	O
with	O
respect	O
to	O
c	O
.	O
This	O
derivative	B-Algorithm
can	O
be	O
found	O
by	O
starting	O
with	O
and	O
then	O
.	O
</s>
<s>
This	O
can	O
easily	O
be	O
verified	O
by	O
using	O
the	O
chain	O
rule	O
for	O
the	O
derivative	B-Algorithm
.	O
</s>
<s>
The	O
idea	O
behind	O
this	O
formula	O
is	O
simple	O
:	O
When	O
the	O
equipotential	O
lines	O
for	O
the	O
potential	B-Language
function	I-Language
lie	O
close	O
,	O
the	O
number	O
is	O
large	O
,	O
and	O
conversely	O
,	O
therefore	O
the	O
equipotential	O
lines	O
for	O
the	O
function	O
should	O
lie	O
approximately	O
regularly	O
.	O
</s>
<s>
Once	O
b	O
is	O
found	O
,	O
by	O
the	O
Koebe	O
1/4	O
-theorem	O
,	O
we	O
know	O
that	O
there	O
is	O
no	O
point	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
with	O
distance	O
from	O
c	O
smaller	O
than	O
b/4	O
.	O
</s>
<s>
The	O
distance	O
estimation	O
can	O
be	O
used	O
for	O
drawing	O
of	O
the	O
boundary	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
,	O
see	O
the	O
article	O
Julia	B-Language
set	I-Language
.	O
</s>
<s>
In	O
this	O
approach	O
,	O
pixels	B-Algorithm
that	O
are	O
sufficiently	O
close	O
to	O
M	O
are	O
drawn	O
using	O
a	O
different	O
color	O
.	O
</s>
<s>
This	O
creates	O
drawings	O
where	O
the	O
thin	O
"	O
filaments	O
"	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
can	O
be	O
easily	O
seen	O
.	O
</s>
<s>
This	O
technique	O
is	O
used	O
to	O
good	O
effect	O
in	O
the	O
B&W	O
images	O
of	O
Mandelbrot	B-Algorithm
sets	I-Algorithm
in	O
the	O
books	O
"	O
The	O
Beauty	O
of	O
Fractals	B-Application
"	O
and	O
"	O
The	O
Science	O
of	O
Fractal	B-Application
Images	O
"	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
estimate	O
the	O
distance	O
of	O
a	O
limitly	O
periodic	O
(	O
i.e.	O
,	O
hyperbolic	O
)	O
point	O
to	O
the	O
boundary	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
,	O
,	O
and	O
are	O
various	O
derivatives	B-Algorithm
of	O
,	O
evaluated	O
at	O
.	O
</s>
<s>
Analogous	O
to	O
the	O
exterior	O
case	O
,	O
once	O
b	O
is	O
found	O
,	O
we	O
know	O
that	O
all	O
points	O
within	O
the	O
distance	O
of	O
b/4	O
from	O
c	O
are	O
inside	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
In	O
such	O
case	O
,	O
the	O
distance	O
is	O
overestimated	O
,	O
i.e.	O
,	O
the	O
reported	O
radius	O
could	O
contain	O
points	O
outside	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
To	O
prevent	O
having	O
to	O
do	O
huge	O
numbers	O
of	O
iterations	O
for	O
points	O
inside	O
the	O
set	O
,	O
one	O
can	O
perform	O
periodicity	O
checking	O
,	O
which	O
checks	O
whether	O
a	O
point	O
reached	O
in	O
iterating	O
a	O
pixel	B-Algorithm
has	O
been	O
reached	O
before	O
.	O
</s>
<s>
If	O
so	O
,	O
the	O
pixel	B-Algorithm
cannot	O
diverge	O
and	O
must	O
be	O
in	O
the	O
set	O
.	O
</s>
<s>
For	O
example	O
,	O
within	O
the	O
while	O
loop	O
of	O
the	O
pseudocode	B-Language
above	O
,	O
make	O
the	O
following	O
modifications	O
:	O
</s>
<s>
Because	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
is	O
a	O
simply	O
connected	O
set	O
,	O
any	O
point	O
enclosed	O
by	O
a	O
closed	O
shape	O
whose	O
borders	O
lie	O
entirely	O
within	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
must	O
itself	O
be	O
in	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
Note	O
that	O
border	O
tracing	O
ca	O
n't	O
be	O
used	O
to	O
identify	O
bands	O
of	O
pixels	B-Algorithm
outside	O
the	O
set	O
if	O
the	O
plot	O
computes	O
DE	O
(	O
Distance	O
Estimate	O
)	O
or	O
potential	O
(	O
fractional	O
iteration	O
)	O
values	O
.	O
</s>
<s>
Border	O
tracing	O
is	O
especially	O
beneficial	O
for	O
skipping	O
large	O
areas	O
of	O
a	O
plot	O
that	O
are	O
parts	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
(	O
in	O
M	O
)	O
,	O
since	O
determining	O
that	O
a	O
pixel	B-Algorithm
is	O
in	O
M	O
requires	O
computing	O
the	O
maximum	O
number	O
of	O
iterations	O
.	O
</s>
<s>
Below	O
is	O
an	O
example	O
of	O
a	O
Mandelbrot	B-Algorithm
set	I-Algorithm
rendered	O
using	O
border	O
tracing	O
:	O
</s>
<s>
This	O
is	O
a	O
400x400	O
pixel	B-Algorithm
plot	O
using	O
simple	O
escape-time	O
rendering	O
with	O
a	O
maximum	O
iteration	O
count	O
of	O
1000	O
iterations	O
.	O
</s>
<s>
That	O
is	O
,	O
even	O
if	O
the	O
outer	O
area	O
uses	O
smooth/continuous	O
coloring	O
then	O
border	O
tracing	O
will	O
still	O
speed	O
up	O
the	O
costly	O
inner	O
area	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
All	O
of	O
them	O
are	O
slower	O
than	O
border	O
tracing	O
because	O
they	O
end	O
up	O
calculating	O
more	O
pixels	B-Algorithm
.	O
</s>
<s>
The	O
basic	O
method	O
is	O
to	O
calculate	O
the	O
border	O
pixels	B-Algorithm
of	O
a	O
box	O
of	O
say	O
8x8	O
pixels	B-Algorithm
.	O
</s>
<s>
If	O
the	O
entire	O
box	O
border	O
has	O
the	O
same	O
color	O
,	O
then	O
just	O
fill	O
in	O
the	O
36	O
pixels	B-Algorithm
(	O
6x6	O
)	O
inside	O
the	O
box	O
with	O
the	O
same	O
color	O
,	O
instead	O
of	O
calculating	O
them	O
.	O
</s>
<s>
A	O
faster	O
and	O
slightly	O
more	O
advanced	O
variant	O
is	O
to	O
first	O
calculate	O
a	O
bigger	O
box	O
,	O
say	O
25x25	O
pixels	B-Algorithm
.	O
</s>
<s>
If	O
not	O
,	O
then	O
split	O
the	O
box	O
into	O
four	O
boxes	O
of	O
13x13	O
pixels	B-Algorithm
,	O
reusing	O
the	O
already	O
calculated	O
pixels	B-Algorithm
as	O
outer	O
border	O
,	O
and	O
sharing	O
the	O
inner	O
"	O
cross	O
"	O
pixels	B-Algorithm
between	O
the	O
inner	O
boxes	O
.	O
</s>
<s>
And	O
split	O
those	O
boxes	O
that	O
do	O
n't	O
,	O
now	O
into	O
four	O
7x7	O
pixel	B-Algorithm
boxes	O
.	O
</s>
<s>
Then	O
it	O
might	O
be	O
optimal	O
to	O
use	O
boxes	O
with	O
a	O
1.4:1	O
aspect	B-Device
ratio	I-Device
,	O
so	O
they	O
can	O
be	O
split	O
like	O
how	O
A3	O
papers	O
are	O
folded	O
into	O
A4	O
and	O
A5	O
papers	O
.	O
</s>
<s>
One	O
variant	O
just	O
calculates	O
the	O
corner	O
pixels	B-Algorithm
of	O
each	O
box	O
.	O
</s>
<s>
However	O
this	O
causes	O
damaged	O
pictures	O
more	O
often	O
than	O
calculating	O
all	O
box	O
border	O
pixels	B-Algorithm
.	O
</s>
<s>
Thus	O
it	O
only	O
works	O
reasonably	O
well	O
if	O
only	O
small	O
boxes	O
of	O
say	O
6x6	O
pixels	B-Algorithm
are	O
used	O
,	O
and	O
no	O
recursing	O
in	O
from	O
bigger	O
boxes	O
.	O
</s>
<s>
(	O
Fractint	B-Application
method	O
.	O
)	O
</s>
<s>
But	O
even	O
if	O
the	O
outer	O
area	O
uses	O
smooth/continuous	O
coloring	O
then	O
rectangle	O
checking	O
will	O
still	O
speed	O
up	O
the	O
costly	O
inner	O
area	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
.	O
</s>
<s>
The	O
horizontal	O
symmetry	O
of	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
allows	O
for	O
portions	O
of	O
the	O
rendering	O
process	O
to	O
be	O
skipped	O
upon	O
the	O
presence	O
of	O
the	O
real	O
axis	O
in	O
the	O
final	O
image	O
.	O
</s>
<s>
Julia	B-Language
sets	I-Language
have	O
symmetry	O
around	O
the	O
origin	O
.	O
</s>
<s>
Supporting	O
symmetry	O
for	O
both	O
Mandelbrot	O
and	O
Julia	B-Language
sets	I-Language
requires	O
handling	O
symmetry	O
differently	O
for	O
the	O
two	O
different	O
types	O
of	O
graphs	O
.	O
</s>
<s>
Escape-time	O
rendering	O
of	O
Mandelbrot	O
and	O
Julia	B-Language
sets	I-Language
lends	O
itself	O
extremely	O
well	O
to	O
parallel	O
processing	O
.	O
</s>
<s>
This	O
is	O
an	O
embarrassingly	B-Operating_System
parallel	I-Operating_System
computing	O
problem	O
.	O
</s>
<s>
Here	O
is	O
a	O
short	O
video	O
showing	O
the	B-Algorithm
Mandelbrot	I-Algorithm
set	I-Algorithm
being	O
rendered	O
using	O
multithreading	O
and	O
symmetry	O
,	O
but	O
without	O
boundary	O
following	O
:	O
</s>
<s>
Finally	O
,	O
here	O
is	O
a	O
video	O
showing	O
the	O
same	O
Mandelbrot	B-Algorithm
set	I-Algorithm
image	O
being	O
rendered	O
using	O
multithreading	O
,	O
symmetry	O
,	O
and	O
boundary	O
following	O
:	O
</s>
<s>
Very	O
highly	O
magnified	O
images	O
require	O
more	O
than	O
the	O
standard	O
64	O
–	O
128	O
or	O
so	O
bits	O
of	O
precision	B-Algorithm
that	O
most	O
hardware	O
floating-point	B-General_Concept
units	I-General_Concept
provide	O
,	O
requiring	O
renderers	O
to	O
use	O
slow	O
"	O
BigNum	B-Algorithm
"	O
or	O
"	O
arbitrary-precision	B-Algorithm
"	O
math	O
libraries	O
to	O
calculate	O
.	O
</s>
<s>
the	O
center	O
of	O
an	O
image	O
)	O
using	O
high-precision	O
arithmetic	O
(	O
z	O
)	O
,	O
giving	O
a	O
reference	O
orbit	O
,	O
and	O
then	O
compute	O
many	O
points	O
around	O
it	O
in	O
terms	O
of	O
various	O
initial	O
offsets	O
delta	O
plus	O
the	O
above	O
iteration	O
for	O
epsilon	O
,	O
where	O
epsilon-zero	O
is	O
set	O
to	O
0	O
.	O
</s>
<s>
For	O
most	O
iterations	O
,	O
epsilon	O
does	O
not	O
need	O
more	O
than	O
16	O
significant	O
figures	O
,	O
and	O
consequently	O
hardware	O
floating-point	B-Algorithm
may	O
be	O
used	O
to	O
get	O
a	O
mostly	O
accurate	O
image	O
.	O
</s>
<s>
There	O
will	O
often	O
be	O
some	O
areas	O
where	O
the	O
orbits	O
of	O
points	O
diverge	O
enough	O
from	O
the	O
reference	O
orbit	O
that	O
extra	O
precision	B-Algorithm
is	O
needed	O
on	O
those	O
points	O
,	O
or	O
else	O
additional	O
local	O
high-precision-calculated	O
reference	O
orbits	O
are	O
needed	O
.	O
</s>
<s>
By	O
measuring	O
the	O
orbit	O
distance	O
between	O
the	O
reference	O
point	O
and	O
the	O
point	O
calculated	O
with	O
low	O
precision	B-Algorithm
,	O
it	O
can	O
be	O
detected	O
that	O
it	O
is	O
not	O
possible	O
to	O
calculate	O
the	O
point	O
correctly	O
,	O
and	O
the	O
calculation	O
can	O
be	O
stopped	O
.	O
</s>
<s>
Further	O
,	O
it	O
is	O
possible	O
to	O
approximate	O
the	O
starting	O
values	O
for	O
the	O
low-precision	O
points	O
with	O
a	O
truncated	O
Taylor	O
series	O
,	O
which	O
often	O
enables	O
a	O
significant	O
amount	O
of	O
iterations	O
to	O
be	O
skipped	O
.	O
</s>
<s>
Renderers	O
implementing	O
these	O
techniques	O
are	O
publicly	B-Algorithm
available	I-Algorithm
and	O
offer	O
speedups	O
for	O
highly	O
magnified	O
images	O
by	O
around	O
two	O
orders	O
of	O
magnitude	O
.	O
</s>
<s>
As	O
the	O
iterative	O
relationship	O
relates	O
an	O
arbitrary	O
point	O
to	O
the	O
central	O
point	O
by	O
a	O
very	O
small	O
change	O
,	O
then	O
most	O
of	O
the	O
iterations	O
of	O
are	O
also	O
small	O
and	O
can	O
be	O
calculated	O
using	O
floating	B-Algorithm
point	I-Algorithm
hardware	O
.	O
</s>
<s>
If	O
floating	B-Algorithm
point	I-Algorithm
hardware	O
can	O
be	O
used	O
to	O
iterate	O
the	O
series	O
,	O
then	O
there	O
exists	O
a	O
relation	O
between	O
how	O
many	O
iterations	O
can	O
be	O
achieved	O
in	O
the	O
time	O
it	O
takes	O
to	O
use	O
BigNum	B-Algorithm
software	O
to	O
compute	O
a	O
given	O
.	O
</s>
<s>
If	O
the	O
difference	O
between	O
the	O
bounds	O
is	O
greater	O
than	O
the	O
number	O
of	O
iterations	O
,	O
it	O
is	O
possible	O
to	O
perform	O
binary	O
search	O
using	O
BigNum	B-Algorithm
software	O
,	O
successively	O
halving	O
the	O
gap	O
until	O
it	O
becomes	O
more	O
time	O
efficient	O
to	O
find	O
the	O
escape	O
value	O
using	O
floating	B-Algorithm
point	I-Algorithm
hardware	O
.	O
</s>
