I have a list of areas of interest where I would like to zoom into the Mandelbrot set. Unfortunately, I don't know the iteration depths to be used.
Question 1: Given (x_min, x_max, y_min, y_max), is there a formula providing a rule of thumb for a reasonable max iteration depth?
Question 2: Given a nice picture, is there a formula providing a rule of thumb how to adjust the max iteration depth when zooming into this picture? like new_max_iter = func(zoom, new_zoom, max_iter)
I am using the iteration number to colorize the set:
def calc_mandel(x_space, y_space, max_iter=50):
res_arr = []
for y in y_space:
row = []
for x in x_space:
c = complex(x,y)
z = 0
for i in range(max_iter):
if (z * z.conjugate()).real > 4.0:
row.append(i)
break
else:
z = z**2 + c
else:
row.append(0)
res_arr.append(row)
return res_arr
and
graph = ax.pcolormesh(x_space, y_space, res_arr, cmap='magma')