XMANDEL(N) X Version 11( 07 March 1989) XMANDEL(N)
NAME
xmandel - window based interface to Mandelbrot sets and Julia sets
SYNOPSIS
xmandel [-display display]
DESCRIPTION
Xmandel is a user friendly interface for generating Mandelbrot sets and
Julia sets. It initially comes up with with six command buttons, which
are described below, for controlling the execution. A Mandelbrot set is
drawn in the window of the initial form when the mandel button is
selected. A separate window is created for drawing the Julia sets.
THEORY
Let z0 be a number in the complex plane (x + yi). Choose a complex
constant C. Calculate z1 = z0 ** 2 + C. Repeat this recursively, so that
z2 = z1 ** 2 + C, z3 = z2 ** 2 + C and so on. z[n] will either tend to
infinity or zero, depending on its initial value and the constant C.
Specifically if the absolute value of z[n], expressed as |z| = sqrt(x**2
+ y**2) is greater than 2, then the recursive formula will diverge.
So, to calculate a Julia set, take each point near (0,0i), and use the
formula z = z**2 + C recursively. The Julia set is the set of points for
which z = z**2 + C would iterate indefinitely for the constant C.
Pixels, which represent numbers in the complex plane, are set to the
number of iterations before |z| exceeds 2. This then becomes an index
into the hardware colormap. Each color then represents the number of
iterations before divergence is detected.
To calculate a Mandelbrot set, again take each point near (0,0i), use the
same formula z = z**2 + C recursively. This time let C be the initial
value of the point itself (C = z0). Rather than having the same C for
every point in the complex plane as in Julia set calculations, C is
different for each point in the plane. Again let the pixel value be the
number of iterations before |z| exceeds 2.
On monochrome displays, the pixel value is set to 1 if the iteration
count is 64, otherwise 0.
Mandelbrot sets and Julia sets are obviously closely related as can be
seen from the similarity of their respective formulas. If the constant C
is chosen from the interior of the Mandelbrot set, then the Julia set
calculated from that constant C will be connected, that is have no gaps
or discontinuities. If the constant C is chosen from outside the
Mandelbrot set, the Julia set will be disconnected, more like grains of
dust (Fatou clouds). If the constant C is chosen from the border of the
Mandelbrot set, then the Julia set will be more convoluted. Given this
relationship between points in the Mandelbrot set and the Julia set
generated, Xmandel provides user selection of the constant C by mouse
selection in the Mandelbrot window.
10/89 Page 1
XMANDEL(N) X Version 11( 07 March 1989) XMANDEL(N)
BUTTONS
To control execution of the calculations, various buttons are provided.
The buttons are:
mandel -
Calculates a Mandelbrot set from (-2.0, -1.5) to (1.0, 1.5) and
display it in the window provided.
julia -
Calculates a Julia set. The user is required to select a point
inside the Mandelbrot window using the left mouse button as the
constant C for the Julia set calculation. It will open a new
window if needed. The Julia set is centered around (0,0), going
from (-1.5, -1.5) to (1.5, 1.5). Julia set points can be selected
from zoomed in Mandelbrot windows as well. Beware of selecting
points outside the Mandelbrot window.
zoom -
In order to zoom in on a given area in the Mandelbrot set, a zoom
button is provided. The area to be zoomed in on is selected with
the left mouse button. Left button down begins the selection,
dragging with left button down draws a rubber banded box to show
the zoom area, and left button up begins the calculation. You can
zoom in on a zoomed in area until you reach the limits of the
precision of your hardware. Selecting a zoom area that crosses a
window border doesn't work.
unzoom -
Return to previous zoom. Note that you can zoom all the way out by
selecting the mandel button.
clear -
Clears the Mandelbrot window.
quit -
This causes xmandel to exit.
BUGS
Xmandel uses hard coded values for button colors, assuming a 256 color
colormap.
Xmandel does not handle exposure events.
Selecting a zoom area that crosses a window border doesn't work.
Performance is slow on workstations, especially workstations without
floating point hardware.
AUTHOR
John L. Freeman
jlf@cray.com
Page 2 10/89