home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
CreativeComputers.iso
/
shareware
/
fractals
/
mandmountains
/
mandelmountains.doc
< prev
next >
Wrap
Text File
|
1994-11-17
|
17KB
|
362 lines
MandelMountains V2.1 by Mathias Ortmann
Discover the Mandelbrot and Julia Sets from a Completely New Point of View!
MandelMountains gives you the ability to render wonderful three-dimensional
images of blow-ups of the Mandelbrot and Julia sets.
The well-known color strips of the usual Mandelbrot images become at once
mountainsides that smoothly climb to high plateaus, leaving deep valleys
between them.
You may have already seen images of this type (e.g. on the covers of the
books "The Beauty of Fractals - Images of Complex Dynamical Systems" by
H.-O. Peitgen and P.H. Richter or "The Science of Fractal Images", edited
by H.-O. Peitgen and D. Saupe) - here and now you have the tool to create
them on your own! MandelMountains allows you to produce high-quality
non-interlaced or interlaced (and even overscan) images of arbitrary areas
of the Mandelbrot/Julia sets. You can easily define magnification windows
to zoom deeper and deeper into this fascinating world.
Since the development of this program took a lot of time and work, I release
it as shareware. This means that if you like and use this program, you
should become a registered MandelMountains user by sending me a little
contribution of about $10. This will make it possible to develop subsequent
versions of this program.
Suggestions, comments and bug reports are welcome, too.
These are my addresses:
(until 31-Jun-1991) (after 31-Jun-1991)
Mathias Ortmann Mathias Ortmann
Via Goito, 5 Strindbergstr. 5
I-20121 Milano D-8000 Munich 60
ITALY GERMANY
IMPORTANT! MandelMountains V2.1 requires the following libraries to be in
your libs:-Directory:
- mathtrans.library
- mathieeedoubbas.library
- mathieeedoubtrans.library
This documentation does NOT cover the theory of fractal geometry, complex
numbers and Mandelbrot/Julia sets. If you never heard anything about these
things, I recommend to read the books mentioned below.
1. The Rendering Method
The image is rendered from front to back. A virtual horizon line prevents
hidden areas from being displayed. The brightness of the surface is
determined by the angle the light falls on it. If the number of iterations
exceeds a certain (user-defineable) value, the pixel is set in color
instead of gray, thus remains of the usual color strips are visible on the
high plateaus, a fact which greatly increases the plasticity of the image.
The Mandelbrot/Julia set fixed point arithmetic iteration code is borrowed
from the commercial program MathVISION (by Doug Houck), published by Seven
Seas Software. MathVISION is a math visualization tool, which lets you
enter arbitrary functions, including the Mandelbrot set, and renders them
in various ways, including the shaded rendering which was borrowed from
MandelMountains.
2. The Display Format
You can choose between three image sizes: Small for quick test
calculations, Normal for the usual screen size (320x200/320x256) and Full
for overscan format (352x240/352x282), which I recommend as ideal size.
MandelMountains supports NTSC and PAL Amigas and recognizes by itself on
which type of machine it is running. All images are generated in 32 color
mode: 16 colors for the gray tones and 16 colors for the surface color range.
Optionally you can enable the interlace mode, which will double the number
of available colors: You now have 32 gray and 32 color tones, which will
result in much smoother color ranges. Computation time is not affected by
using interlace or non-interlace mode.
3. The File Format
MandelMountains writes standard IFF files with an additional "MMD1" chunk
containing all parameters of the image, so you can load previously
generated images and make further magnifications. You can load
MandelMountains files with all available graphics software, but note that
if the image is saved again, the MMD1 chunk will be destroyed, and you
cannot load it with MandelMountains any more.
MandelMountains V2.1 is fully backwards compatible with all previous versions.
4. The Parameters
An image is defined by several parameters. You can see and modify all of
them in the window MandelMountains opens on the Workbench screen.
The cx/cy values are used only when working in Julia set mode. They are the
real/imaginary part of the fixed parameter c in the term z = z▓+c.
See below for a detailed description of how to generate images of Julia sets.
In the next two lines, there are the xmin/xmax/ymin/ymax values. They
determine the rectangular part of the Mandelbrot set that is to be shown in
the image (xmin/xmax represent the range of the real part, ymin/ymax of the
imaginary part of c [in Julia set mode: z] in the term z = z▓+c).
The Depth value limits the number of iterations. If then the value of z
has not exceeded a certain maximum, the point will be drawn in black.
Increasing this value will result in a more detailed rendering of the
border between color and black, but it will also increase computation time
if there are larger areas of black. Normally, a Depth of 400 to 2000 is
sufficient.
Linear/Nonlinear/Super-Nonlinear Transformation: If your mountainsides
look extremely steep, you should switch to Nonlinear Transformation.
For extreme cases, there is the Super-Nonlinear transformation, which is
especially useful for magnifications of the western side of the Seahorse
Valley.
ColorMin: If you wish to have the surface of the plateaus colored (and
you surely will!), you set ColorMin to the number of iterations from which on
a pixel is to be drawn in color. Increasing this value will make the colored
areas smaller. The range of ColorMin is normally from 20 to 300 (set it to 0
if you wish no coloring).
ColorDiv: This value determines the "step rate" for the surface colors.
For example: You have a ColorMin of 100 and a ColorDiv of 50. The number
of iterations for a point is 300. The color of the point is now
(300-100)/50, i.e. 4. Usually ColorDiv is around 50 to 150. It is not
very critical, but if you choose it far too low, the colored areas on
your surface will look rather fragmented. If you choose it too high, they
will all have more or less the same color.
HZoom: This very important value is the decimal logarithm of the factor
all heights are multiplied with. If you choose this value too low, the
whole surface will be flat like a sheet of paper; if you choose it too
high, you will not see more than some vertical walls. This value is
probably the most critical and must be chosen carefully. It depends very
much on the magnification factor (increase it after each magnification) and
can range from 2 (initial picture) to 30 (blow-ups of details in the
Seahorse Valley, for example).
Remember that for nonlinear and super-nonlinear transformation, HZoom
must be considerably higher than for linear transformation.
HSmooth: Sometimes it may occur that the border of a plateau looks rather
fragmented. In this case, simply increase the HSmooth value. It can range
from 0 up to more than 200, depending on the HZoom value you are using, but
is not very critical. Set it to 50 for normal images.
It must be said that you will have to experiment a little to get perfect
results, but soon you'll get a feeling for these things (look at the sample
pictures and their parameters).
The 'Parameters' menu of MandelMountains contains the submenu 'Suggest'
which allows you to precalculate two of the above parameters. See below
for a further description of this feature.
5. The Menus
Project Menu:
Choosing the Load Image or Save Image option will bring up a file requester
(thanks Justin!) that allows you to choose a file name for the image to
load/save. Images are compressed before saving.
In MandelMountains V2.1, you can optionally save an image without the MMD1
chunk. This ensures full compatibility with all graphics software, but
images without MMD1 chunk can't be loaded into MandelMountains any more!
Start Rendering: This option clears the current screen, brings it to front
and starts the computation.
In contrary to MandelMountains V2.0, the workbench display window will not be
cleared, so you can still see all the parameters. The menu will remain
active, too, although most of the menu points are ghosted. The most
important feature is that the task priority of MandelMountains is now
changeable during computation.
Mode: You can select between Mandelbrot and Julia Mode (see below for details
about Julia sets).
Precision: This submenu allows you to choose either single precision (32 bit)
or double precision (64 bit) mode. Double precision mode becomes necessary
when you see vertical stripes in your image - usually, this occurs when
the magnification factor approaches 10000-20000.
Double precision is about three times slower than single precision, but it
allows for magnification factors up to several millions.
Parameters Menu:
Zoom In brings the current screen to front and creates a mouse-directable
magnification window. Pressing the left mouse button while moving the
mouse to the right/left changes the size of the window. The right mouse
button confirms the magnification.
Restore Aspect is useful when you have entered xmin/xmax/ymin/ymax values
by hand. By restoring the aspect of width and height you ensure that the
image does not look squeezed.
Suggest is a feature which I implemented to give you a basis for your
experiments by generating suggestions for the parameters Depth and HZoom.
After some initial problems, I found a quite adequate way to precalculate
the HZoom value. The results of the algorithm are surprisingly good - in
most cases they need not be altered at all and thus will save you a lot of
experimenting time!
The algorithm needs some time to evaluate its result. The percentage
of completion is shown by a horizontal bar. You can cancel the computation
by pressing the Escape key, or terminate it at any time by pressing
<Return>, accepting the current state of evaluation, which in most
cases is not too far away from the final result.
Sometime, the result of the precalculation will be 0. Then you either have
to increase the Depth value, or - if this doesn't help - it's time to
switch over to Non-Linear/Super-Nonlinear Transformation.
Screen allows you to choose one of the three standard screen sizes and
to toggle interlace mode.
Color Range Menu:
This menu controls range of surface colors. Different color ranges may
greatly change the impression of an image, so experiment a little.
Available as from/to colors are: Black, Blue, Red, Magenta, Green, Cyan,
Yellow and White. Additionally, you can cycle the colors by pressing F1/F2
at any time.
6. Julia Sets
Julia sets are generated by varying the initial value of z in the iteration
formula z = z▓+c, leaving c constant for each pixel (Mandelbrot set:
The parameter c is varied instead of z, and the iteration always starts
with z = 0).
There exists an infinite number of Julia sets, all determined by the
fixed parameter c (displayed in the top line of the parameter block; cx is
the real, cy the imaginary part of c).
You can either enter a c value directly by hand, or choose it from a
position out of the Mandelbrot set. This is done as follows:
1. Load an arbitrary MandelMountains image of the area you are interested in.
2. Select "Zoom In" from the Parameters Menu.
3. Mark the desired point with the TOP LEFT corner of the zoom window and
press the right mouse button.
4. Select "Julia Set" from the Project/Mode Menu. The parameters xmin/ymin,
representing the selected top left edge, will be copied to the cx/cy
fields. The other values will be initialized with default values,
giving the best possible environment for most Julia sets.
Experimenting with this feature, you will discover a fascinating similarity
of the Julia sets to the area their parameter c is taken from (e.g. for a
c value out of the Seahorse Valley, there will be the same seahorse tails
and eyes as in the Mandelbrot set). Thus the Mandelbrot set can be
interpreted as a "one-page dictionary" of all existing Julia sets.
I recommend to choose the c values mainly from the border area of the
Mandelbrot set, because otherwise the resulting Julia sets will look
rather boring.
Certainly, you can zoom into Julia sets exactly like into the Mandelbrot set.
7. When is a Picture Finished?
Normally, you will wait until the screen is filled completely (up to the
upper edge). In this case, the program stops the computation by itself.
Sometimes, it may be necessary for aesthetical reasons to interrupt the
rendering earlier, resulting in a black background of the image. In this
case, you simply have to click on the STOP Gadget at the right moment.
Important:
Clicking on the gadget near the depth gadgets of MandelMountain's
workbench window will make the current screen appear (with correct
centering if it's an overscan screen), clicking on the screen and then
pressing the right mouse button will make the screen disappear again.
If you haven't got a true Fast-RAM machine, I recommend to click the screen
to back during computation. This will save memory cycles for the CPU and
greatly reduce computation time.
Special thanks go to Heinz-Otto Peitgen for publishing the formula that
smoothes the surface of the Mandelbrot set in such a perfect way! It is
called Continuous Potential Method for Mandelbrot set (CPM/M) and can be
found in chapter 4.2.4 of the book
Heinz-Otto Peitgen/Dietmar Saupe (editors): The Science of Fractal Images
Springer-Verlag New York Berlin Heidelberg 1988 ISBN 0-387-96608-0
Springer-Verlag Berlin Heidelberg New York 1988 ISBN 3-540-96608-0
If you are looking for an excellent introduction into fractal theory,
history and mathematical backgrounds of the Mandelbrot and Julia sets,
including a couple of wonderful color pictures, you should take a look at
H.-O. Peitgen/P.H. Richter:
The Beauty of Fractals - Images of Complex Dynamical Systems
Springer-Verlag New York Heidelberg Berlin Tokyo 1986 ISBN 0-387-15851-0
Springer-Verlag Berlin Heidelberg New York Tokyo 1986 ISBN 3-540-15851-0
--------------------------------------------------------------
PathMaster File Selector
User Documentation 89-06-26.
--------------------------------------------------------------
Copyright ⌐ 1989 by Justin V. McCormick.
All Rights Reserved.
The selector is completely dynamic and asynchronous; you may change
directories, select files, scroll the file list, etc., while the selector
is scanning a directory.
The three Sort Gadgets (Alpha, Size, and Date) work like switches. For
instance, if you click on the "Alpha" Sort Gadget, the gadget will remain
highlighted ("On") when you release the mouse button. The File Selector
will now alphabetize directories automatically until you turn the Sort
Gadget "off" by clicking it again, or click on a differnt Sort Gadget.
Clicking the Menu Button activates the FILE or PATH String Gadget,
allowing you to type in a new file or pathname without having to click
inside of the string gadgets first. Also, some keyboard shortcuts are
available:
ESCAPE key - Same as clicking on the "Cancel!" gadget.
Cursor-Up key - Same as clicking on the Up Arrow gadget.
Cursor-Down key - Same as clicking on the Down Arrow gadget.
Shift-RETURN keys - Toggle between FILE and PATH gadget.
Note that if the PATH, FILE, or PATTERN String Gadgets are in use, the
keyboard shortcuts are disabled.
The selector has a software path length limit of 344 characters. You
will receive a warning message in the titlebar if you try to exceed this
limit.
The PathMaster name is a trademark of Justin V. McCormick.
PathMaster File Selector source and documentation written by:
Justin V. McCormick.
Copyright ⌐ 1989 by Justin V. McCormick.
All Rights Reserved.
* --------------------------------------------------------------------- *
THIS SOFTWARE IS PROVIDED "AS IS".
NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE
ACCURACY, RELIABILITY, PERFORMANCE, CURRENTNESS, OR OPERATION
OF THIS SOFTWARE, AND ALL USE IS AT YOUR OWN RISK.
THE ABOVE AUTHOR ASSUMES NO RESPONSIBILITY OR
LIABILITY WHATSOEVER WITH RESPECT TO YOUR USE OF THIS SOFTWARE.
* --------------------------------------------------------------------- *