Mandelbrot Set



A very basic implementation of mandelbrot set algorithm with some performatic improvements using Numba.

Considering $z_0 = 0$ and the constant $c = x + iy$, we can calculate the mandelbrot set for each point as:

$$ \large \begin{aligned} z_1 & = z_0^2 + c \\ & = 0^2 + x + iy \\ & = x + iy \\ z_2 & = z_1^2 + c \\ & = (x + iy)^2 + x + iy \\ & = x^2 + i^2y^2 + i2xy + x + iy \\ & = x^2 - y^2 + x + i(2xy + y) \\ z_{n+1} & = z_n^2+c \end{aligned} $$