I am trying to calculate the Mandelbrot set in Python 3.6 and i don't want to use the complex objects to calculate it. Does anybody have a getIterationCount(x, y)
function?
I tried to rewrite java code to python but it didn't work.
def getIterationCount(x, y):
maxiter = 100
z = complexe(x, y)
c = z
for n in range(0, maxiter):
if abs(z) > 2:
return n
z = z*z + c
return maxiter