5  Mandelbrot

This tool collection includes three elements: the classical Mandelbrot set, the attractors of solving the complex equation \(x^3 = –1\) by Newton’s method and the so called Collatz fractal.

5.1 Mandelbrot’s Set

The Mandelbrot Widget

The Mandelbrot Widget

The Mandelbrot set is constructed and displayed. The Mandelbrot set is defined as the following subset of the complex plane: \[ M= \lbrace c\in \mathbb{C} \;|\; (z_n)\; remains \; bounded,\;\; z_{n+1} = z_{n}^2 +c, z_0 = 0 \rbrace \] Such, in the picture, the black object is the Mandelbrot set. The nice colors are determined by the speed of divergence.

The Julia set of a given point \(c\) is defined as the following set of points in the complex plane: \[ J_c= \lbrace z\in \mathbb{C} \;|\; (z_n)\; remains \; bounded, \;\; z_{n+1} = z_{n}^2 + c, z_0 = z \rbrace \]
The Julia set of a point is calculated if clicked with the right mouse button and additionally by selection the Live Julia checkbox (see below).
Clicking the right button at a point in the image initiates the computation of the Julia set with the selected numer of iterations and stops the Live Julia function.

A Julia Set

A Julia Set

Live Julia

Selecting this checkbox opens a new window. In this new window the Julia set of the Mandelbrot fractal is live updated upon cursor movements. To be fast enough, the Julia set is computed with a reduced number of iterations.

5.2 Newton roots

The tool allows also the visualization of the basins of the roots \(z_i\) of the complex equation \(x^3 = –1\) calculated by Newton’s method.

The three basins \(B_i\) are defined as the following sets of points:

\[ B_i=\lbrace x \in \mathbb{C} \; | \; x_n \rightarrow z_i,\; x_0=x, \; x_{n+1} = x_n - \frac{f(x)}{f'x)}, \; f(x)=x^3+1\rbrace \]

5.3 Collatz’ Fractal

The Collatz fractal in the complex plane is derived from the Collatz conjecture, a mathematical sequence defined by the function: \[ f(z) = \begin{cases} \frac{z}{2} & \text{if } z \text{ is even} \\ 3z + 1 & \text{if } z \text{ is odd} \end{cases} \]

or in complex formulation1 : \[ f(z) = \frac{2.0 + 7.0 \cdot z - (2.0 + 5.0 \cdot z) \cdot \cos(\pi \cdot z)}{4.0} \]

Starting with a complex number \(z_0\) , the Collatz fractal is generated by iteratively applying the function \(f(z)\) to the result of the previous iteration.
The behavior of this iteration is observed in the complex plane.

5.4 Common widget functions

5.4.1 Zooming

Within the picture (the canvas area) a rectangle can be defined by pressing and holding the left mouse button and dragging the mouse while the button is pressed. Calculate starts the calculation of the new cut-out. The number of iterations must be set higher the more you go into detail.
Additionally, you can zoom in and out by using the mouse wheel.

5.4.2 Reset

Pressing this button resets the canvas to the initial coordinates. The selected number if iterations is not effected.

5.4.3 Calculate

The part of the Mandelbrot Set is calculated depending on the cut-out. The number of iterations determines the accuracy.

5.4.4 Reset

Pressing this button resets the canvas to the initial coordinates. The selected number if iterations ist not effected.

5.4.5 Save & Print

A Postscript output and a gif output is generated and stored in <Path to Store Directory>/plots.
The files are named automatically.


  1. The derivation of this representation of the Collatz equation can be found at 3D-Meier↩︎