I couldn't resist to proposing a MetaPost version. After all, MetaPost is embedded in LuaTeX and thanks to the package luamplib
we have direct access to it, so it would be a pity not to take advantage of this fact :-)) All credits must go to Stephan Kottwitz though (and to Herbert previously), since the following code is almost entirely an adaptation of his Lua Code to MetaPost. Without it, drawing this would probably not have been possible to me, since I know too little about fractals.
Notice the call to MetaPost's newly implemented floating point number system by the instruction \mplibnumbersystem{double}
. I figure it is necessary, due to the heaviness of the computations.
Caution: it may take several minutes for the following code to compile! (10 min for my 5-year old laptop.)
\documentclass[12pt]{article}
\usepackage{luamplib}
\mplibnumbersystem{double}
\mplibtextextlabel{enable}
\begin{document}
\begin{center}
\leavevmode
\begin{mplibcode}
u := 4cm;
vardef mandelbrot(expr xa, xb, ya, yb, steps, max_iter, maxs) =
save dx, dy, cx, cy, xtemp, ytemp, squaresum, iter; clearxy;
dx := (xb-xa)/steps;
dy := (yb-ya)/steps;
cx := xa;
forever:
exitunless cx <= xb;
cy := ya;
forever:
exitunless cy <= yb;
squaresum := 0;
x:= 0; y:= 0; iter := 0;
forever:
exitunless (squaresum <= maxs) and (iter < max_iter);
xtemp := x**2 - y**2 + cx;
ytemp := 2*x*y + cy;
x := xtemp;
y := ytemp;
iter := iter + 1;
squaresum := x**2 + y**2;
endfor;
if iter >= max_iter: draw u*(cx, cy); fi;
cy := cy + dy;
endfor;
cx := cx + dx;
endfor;
enddef;
beginfig(0);
% Coordinates and marks
xmin = -2; xmax = 0.75; ymin = -1.25; ymax = 1.25; len := 6bp;
draw u*(xmin, ymin) -- u*(xmax, ymin) -- u*(xmax, ymax) -- u*(xmin, ymax) -- cycle;
for i = -1.5 step .5 until .5:
label.bot("$" & decimal i & "$", u*(i, ymin));
draw u*(i, ymin) -- (i*u, ymin*u+len);
draw u*(i, ymax) -- (i*u, ymax*u-len);
endfor;
for j = -1 step 1 until 1:
label.lft("$"&decimal j&"$", u*(xmin, j));
draw u*(xmin, j) -- (xmin*u+len, j*u);
draw u*(xmax, j) -- (xmax*u-len, j*u);
endfor;
% Mandelbrot fractal
pickup pencircle scaled 1bp;
mandelbrot(-2, 1, -2, 2, 500, 1000, 4);
endfig;
\end{mplibcode}
\end{center}
\end{document}

TikZ
library for fractal decorations (30.7 Fractal Decorations) and a Lindenmayer systems library (37 Lindenmayer System Drawing Library)