I am trying to zoom into a Mandebrot set with Matlab, which is based on a meshgrid. After the first plot you can pick two points which define the zoom area and between these two points a new meshgrid is generated. This new meshgrid is the origin for the new plot. The problem now is, that the new plot is rather shapeless.
I tried this concept (zoom by calculating iterations in a narrower grid) for other julia sets, but this did not work well either. I am wondering, whether this is a completly wrong concept now.
a = 0;
func = @(x,c) x.^2 + c;
realAx = linspace(-2,1,1000);
imagAx = linspace(-1,1,1000);
[x,y] = meshgrid(realAx,imagAx);
complex = x + y*1i;
for n = 1:100
a = func(a,complex);
end
a(abs(a) >= 2) = 0;
contour(abs(a));
[u,v] = ginput(2);
while true
while ~((u(1,1) < u(2,1)) && (v(1,1) < v(2,1)))
[u,v] = ginput(2);
end
% Get zoom values
figure;
% Create new start coordinates
zoomX = linspace(x(round(u(1,1))),x(round(u(2,1)),1000));
zoomY = linspace(y(round(v(1,1))),y(round(v(2,1)),1000));
[x,y] = meshgrid(zoomX,zoomY);
complex = x + y*1i;
a = 0;
for n = 1:100
a = func(a,complex);
end
a(abs(a) >= 2) = 0;
contour(abs(a));
[u,v] = ginput(2);
end
I expect a more detailed version of the zoom area to appear. I would be really glad, if anybody had advice or would provide a different concept for zooming into the Mandelbrot set.