Whereas there is only one Mandelbrot set, there is one Julia set for every complex number
. The Mandelbrot set
is an index of sorts into the Julia sets. If
, then the Julia set
is connected. Alternatively, if
, then
is not connected, in which case
is charmingly referred to as fractal dust.
The following program shows the Mandelbrot set on the front side of the square pane, and the corresponding Julia set
on the back. Here, the complex number
is fixed by the center of the current view of
. As you zoom and pan on
(and press Go),
is updated for the new value of
.1
Mandelbrot and Julia sets together
This joint Mandelbrot-Julia program is as efficient as the previous programs that render only one of the two sets. The fragment shader computes only one of the sets in each frame, depending on which side of the square pane is visible.
- The window on the complex plane varies for
under zoom and pan but remains fixed for the Julia sets. ↩