Mandelbrot landscape

The previous few pages render the Mandelbrot set M in two dimensions by painting it onto a rectangular pane. The present program renders M in three dimensions. A window on the complex plane is overlaid with a regular grid each of whose grid points corresponds to a complex number c. The grid is lifted into space by translating each grid point to a height equal to c‘s escape time.1c\notin M[/latex] is the smallest n such that |z_n|>2 where z_{n+1}=z_n^2+c and z_0=0. We’ll say that the escape time of c\in M is equal to one greater than the maximum number of iterations (levels).] As in the previous pages, escape time is used to determine color. But on the 3D landscape, it is also used to determine height.

In the following program, the 3D landscape is built on the back side of the rectangular pane. The pane’s front side presents the flat Mandelbrot set with navigation control for zooming and panning. When the user presses Go, the Mandelbrot set gets recomputed for the 3D landscape, whereas it gets recomputed (as before) for the front navigation side on every rendering refresh.

Mandelbrot landscape

  1. Recall that escape time of [latex