• Remix
  • Share
  • New Entry

  • Daniel Pereira

  • /
  • Discovering incredible worlds when zooming in Mandelbrot set

on 30 Nov 2023
  • 17
  • 19
  • 0
  • 0
  • 401
drawframe(23);
Write your drawframe function below
function drawframe(f)
P = [-0.743643887037158704752191506114774, 0.131825904205311970493132056385139];
S = logspace(0.5,-7,48);
k = linspace(-S(f),S(f),300);
[X,Y] = meshgrid(k+P(1),k+P(2));
Z = X+1i*Y;
F = zeros(size(Z));
selection = true(size(Z));
R = F;
for i=1:max(100,S(f).^-0.6)
F(selection) = F(selection).^2 + Z(selection);
selection = selection & abs(F)<=2;
R(selection) = i;
end
imagesc((R-min(R(:)))/(max(R(:))-min(R(:))));
axis equal off;
end
Animation
Remix Tree