- /
-
Mandelbrot Zoom Self Similarity
on 29 Nov 2023
- 23
- 35
- 1
- 0
- 337
drawframe(48);
Write your drawframe function below
function drawframe(f)
M=polyval([-13.6536/199 13.6536*200/199],f);
x=-1.40116+255*eps*10^M*[-1 1]/2;
y=0+240*eps*10^M*[-1 1]/2;
[X,Y]=meshgrid(linspace(x(1),x(2),255),linspace(y(1),y(2),240));
Z=X+1i*Y;
z=0*Z;
c=z;
for k=1:round(polyval([0.38 6.21 25],f))
z=z.*z+Z;
c(abs(z)<2)=k;
end
imagesc(linspace(x(1),x(2),255),linspace(y(1),y(2),240),c);
colormap(turbo);
axis equal off tight;
end