15 Jun

Approximation of the Mandelbrot set

dots of complex numbers in green are not part of the Mandelbrot set. Each Iteration eliminates new complex numbers. The brighter the color, the higher the iteration until n>2.

The Mandelbrot set is a set of complex numbers, generated with the sequence z_{n+1}=z_n^2+c, where c\in\mathbb{C} and z_0=0. The complex numbers in the set fulfill the following equation

\forall n\in\mathbb{N} :  ||z_n||_\infty \leq d\in\mathbb{R}

In some cases, d is defined as d=2, therefore the computation is much simpler.  

In this case, the Mandelbrot set is defined as

    \[\mathbb{M}=\{c\in\mathbb{C} | sup_{n\in\mathbb{N}} (|z_n|)\leq 2} |z_{n+1}=z_n^2+c , z_0=0 \}\]

It is easier to determine, which of the numbers c\in\mathbb{C} are not in the Mandelbrot set

    \[\bar{\mathbb{M}}=\{c\in\mathbb{C} | sup_{n\in\mathbb{N}} (|z_n|)> 2} |z_{n+1}=z_n^2+c , z_0=0 \}\]

This requires a iterative approach on the sequence z_n, which determines in finite steps, if the value of ||z_n||_\infty gets above the threshold. I demonstrate this method in the code snippet here. The Code generates a pattern of 599999 cases and checks cases to n=100.

This is a screenshot of complex plane for the Mandelbrot set without the restriction c=2. If ||z_n||_\infty gives a overflow of the 128-bit float complex number, the function gives back the value 0, which corresponds to black. This means the black dots are not part of the set \mathbb{M}.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.