Mandelbrot Orbits

The red lines that originate from the mouse position plot the "orbit" of the point under the mouse. The orbit is the sequence of numbers that results from iterating the complex map that generates the Mandelbrot set zn+1=(zn)2+c. The mouse position is plugged in as the constant c, and the formula is iterated. The resulting sequence of points are drawn by connecting them with red lines. Notice that points that belong to the Mandelbrot set tend to spiral in towards a center point or repeatedly cycle between a fixed number of points, while areas outside the set eventually grow beyond the white circle of radius 2, and hence continue on to infinity.

The source code for this Java applet is here: Orbits.java