2.4 The fractals module

fractals.julia($$z$,$z_c$,$m$)$
The fractals.julia($$z$,$z_c$,$m$) function tests whether the point $z$ in the complex plane lies within the Julia set associated with the point $z_c$ in the complex plane. The expression $z_n+1 = z_n^2 + z_c$ is iterated until either $|z_n|>2$, in which case the iteration is deemed to have diverged, or until $m$ iterations have been exceeded, in which case it is deemed to have remained bounded. The number of iterations required for divergence is returned, or $m$ is returned if the iteration remained bounded – i.e.\  the point lies within the numerical approximation to the Julia set. $

fractals.mandelbrot($$z$,$m$)$
The fractals.mandelbrot($$z$,$m$) function tests whether the point $z$ in the complex plane lies within the Mandelbrot set. The expression $z_n+1 = z_n^2 + z_0$ is iterated until either $|z_n|>2$, in which case the iteration is deemed to have diverged, or until $m$ iterations have been exceeded, in which case it is deemed to have remained bounded. The number of iterations required for divergence is returned, or $m$ is returned if the iteration remained bounded – i.e.\  the point lies within the numerical approximation to the Mandelbrot set. $