Dec 092017
Explore the Mandelbrot Set w/Windows...
File MANDL2.ZIP from The Programmer’s Corner in
Category Printer + Display Graphics
Explore the Mandelbrot Set w/Windows…
File Name File Size Zip Size Zip Type
MANDEL2.DOC 12371 4476 deflated
MANDEL2.EXE 90489 55103 deflated
MANDEL2.SCR 64007 11628 deflated
SHIELD.SCR 64007 23267 deflated
SPIRAL.SCR 64007 27124 deflated
XLATE.EXE 42401 31557 deflated

Download File MANDL2.ZIP Here

Contents of the MANDEL2.DOC file

Mandelbrot Set Program version 2.0

December 1988

John Futhey
516 Maria Dr.
Petaluma CA 94952
(707) 763-9252

There are four files: Mandel2.exe, Mandel2.scr, Mandel2.doc,
and Xlate.exe.
Mandel2.exe is the main program and is called by just typing
"Mandel2". Mandel2.scr is a data file of the full Mandelbrot set
(which loads automatically) and must be in the same directory as
Mandel2.exe. Mandel2.doc is the documentation which you are
reading. Xlate.exe is a translate file for those of you who may
have an earlier version of this program. If you don't have an
earlier version, just ignore this file. If you do, your old saved
screen files had the .SCN extension and loaded very slowly. This
new version loads saved files very fast, but they have a slightly
different format, and so if you have some old .SCN files,
Xlate.exe will change them to the .SCR file format necessary to
run with version 2. You will like it!

This program requires EGA to run. A math coprocessor helps.

IMPORTANT -- Adjust the brightness and contrast of your monitor
for the best color quality.

For a mathematical description of the Mandelbrot Set, see the
appendix at the end of this documentation.

Some comments about the program and how to use it:

1. The program is very user friendly (really!). The function
key assignments and directions are on view at all times so you
need not memorize strange key combinations. For certain critical
commands, there is an "undo" function so you may retreat if you
change your mind or get somewhere by mistake.

2. The full Mandelbrot set is automatically loaded when you
start the program and is in memory at all times. Just a
keystroke will bring it to view. A specially selected palette
provides excellent color blending.

3. In general, one goes hunting for the hidden, intricate, and
beautiful detail contained in the set. The most fruitful areas
to search will usually be in or around the complex borders of the
black areas (see appendix). Like a microscope, you are going to
zoom in on a small portion of the full set and then enlarge it to
see what wonders it may reveal. This program provides two ways
to do this.

a. If you know the x and y coordinates and width of a
region, you can manually input these numbers and the program
will start its gruesome calculations. For instance, an
interesting area is at xcntr=-.1364953, ycntr=1.0049645 and
has width=.0019288 (try it).

b. A more intuitive way is by using a graphics box. Turn
the box on, (F3), then move it around the screen with the
direction keys, shrink it or expand it (big or small
increments) until it encompasses the region of your inter-
est, then just hit F10 (begin plotting), and the computer
does the rest. (As you move the box, its position and size
will be shown at the bottom of your screen.)

c. After having chosen F10, you will be asked for a choice
of r/f (for rough or fine). The fine choice gives you the
maximum resolution and is what you want to use when you
get something nice and want to keep it. The fine choice also
takes a long time to run. The rough choice runs about ten
times faster, but only calculates and prints every 5th line.
This is enough detail to see what you are getting, and
it saves the long wait of the 'fine' choice. (In case
your search is not very interesting and you want to quit,
move on, and look somewhere else.)

4. Once you have found a region you like and there it is in all
its glory, you may save it to a screen file. Then later you
can call it up from your disk. (It takes much less time to call
up a saved file than the time for the original plotting, so this
makes sense.) Save your screen files with the extension *.SCR
because when you later have a collection of them and are in the
program and want to call one up, a listing of the available *.SCR
files in your current directory will be displayed in case you
forget their names.

5. You always have the full Mandelbrot Set in memory, and can

view it by using F1, the screen toggle key. If you have either
plotted a second screen, or called one up from a file, you can
toggle between this one and the full set. (They are big, so you
only have two of them, the full set always, and your most recent
other one.)

6. Color, color, color! That's why you got your EGA and here
is a chance to show it off. F9 is the color key and it brings up
a separate menu. You may choose from 5 special palettes of
blended shades. You may even mix any two of them for more fun.
(Note that rb, for red-blue, will give a slightly different palette
arrangement than br, for blue-red.) In addition, you have the
defalt palette and inverse defalt palette. (If your eyes can
stand it, try the electric palette!) You don't have to learn the
intricacies of EGA palettes, just pick a letter or two. Finally,
you may step through colors and watch the figures on your screen
move and twist by pressing the key. Mikey likes it.

7. As you may know (see appendix again -- sorry), the Mandelbrot
Set is determined by a recursion procedure which tests for a con-
dition. For great accuracy of detail, one needs to have a very
large recursion limit -- at the expense of the time it takes to
generate a full screen. If the recursion limit provides detail
that is finer than the resolution of the screen, it is wasted
effort, yet when you really zoom in, if the limit is too small,
you lose the richness you're looking for. This program utilizes
an auto recursion limit, i.e., it sets the recursion limit as a
function of the amount of zoom you're using. One result you buy
into with this scheme is that the further you zoom, the longer it
takes for the program to run. (This can amount to several hours
for an older 4.77 Mhz machine.)

8. If you are plotting an area and the results are disappoint-
ing, you don't have to wait for the screen to complete. Just hit
any key to stop the procedure. But perhaps there is an interest-
ing region within the small portion that you did plot; well, just
turn on your zoom box, go to it, and start again. In other
words, you can zoom from a zoom!

One note: there is a limit to your zooming -- eventually
the computer just can't deal with it. As a rule of thumb,
if the width of your box (or manual input) is less than
.00002 or so, you may start to run into trouble, or even
crash the program.

9. There are a number of selections that provide the message,
"Are you sure? y/n". As a rule, such checks for safety insult my
intelligence and I find them tiresome. The reason they are
included is that if you are plotting, or have just finished plot-
ting, a great sub-region of the Mandelbrot Set, it may have taken
you several hours (for a large zoom). To watch it all vanish off
the screen before you can save it to a file merely because you
pressed the wrong key is a bitter experience. The minor aggreva-
tion of the safety check is cheap insurance.

10. Time for the commercial now. This is shareware, and I
encourage you to provide it free to your friends (or enemies),
upload it to your favorite bulletin board, etc., but you do not
have permission to sell it. However, if you like the program, I
would apreciate a contribution for my effort. If you send $20, I
will send you a diskette (5.25" only) with 7 excellent screen
files that I have captured in my wandering through the Mandelbrot
jungle. Then you only have to load them instead of search for
and generate them yourself. (Time is money)

Any comments or suggestions (or bugs?) will be welcome also.

Please send to: John Futhey
516 Maria Dr.
Petaluma CA 94952



The Mandelbrot Set was discovered by -- and named after -- Benoit
Mandelbrot, and is a special case of a broad study called fractal
geometry. There is a facinating account, with lovely color pho-
tos, of this rich curiosity in the July 1985 Scientific American.

The Mandelbrot set is the set of complex numbers that meet a cer-
tain condition. Recall that a complex number has a real and
imaginary part and we may express it as:


where a0 is the real part and b0i the imaginary part, with i
being equal to the square root of -1. Consider another complex

c1=a1+b1i where

c1=c0+c0^2 (^ stands for exponentiation)

Now imagine an infinite recursion of this series such that:


where also, cN being a complex number, cN=aN+bNi. It has been
proven that as N goes to infinity, if aN^2+bN^2<=4, then the
original number c0 is a member of the Mandelbrot set. Unfortu-
nately, infinity is a rather large number, so to be practical, we
assign N to be some reasonable finite number, and if after N
recursions the test holds, we assign c0 to the Mandelbrodt Set.

So, where do the pretty pictures come from? If the test fails
before the number of recursions gets to N, we assign a color
according to what step it failed at. We then assign a pixel on
the screen with its x value equal to the real part of c0, and its
y value equal to the imaginary part, and give it that color.
(Consider that there are over 130,000 pixels in our viewport, and
each one of them must be tested by this lengthy recursion
process!) I have chosen N as a function of the amount of zoom
being used so that picture detail matches the monitor's resolu-
tion. Therefore, the bigger the zoom, the larger N is, and
consequently, the program runs more slowly for large zooms. So
that Murphy's law is not violated, it should be noted that in
general, the most interesting regions require the largest zoom,
and hence they test your patience. Happy hunting.

 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>