- /
-
Mandelbrot contour
on 27 Oct 2021
- 3
- 98
- 2
- 0
- 167
[x,y]=meshgrid(-2:0.001:0.5,-1.2:0.001:1.2);
c=x+y*i;
z=zeros(height(y),width(x));
m=z;
for j=2:64
z=z.^2+c;
m(logical((m==0).*(abs(z)==Inf)))=j;
end
contour(x,y,m,64)
axis equal off