home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fujiology Archive
/
fujiology_archive_v1_0.iso
/
!MAGS
/
!BONUS
/
COVERDSK
/
STFORMAT
/
STF34.ZIP
/
STF34A.MSA
/
MANDY
/
README.DOC
< prev
Wrap
Text File
|
2004-11-04
|
21KB
|
547 lines
CONTENTS
Line 12 The Mandelbrot Set - an introduction.
Line 30 Running the program - an overview.
Line 175 Some notes on the Maths libraries.
Line 217 What the Mandelbrot and Julia Sets are all about.
Line 291 Full description of the program options.
Line 337 How to set your own defaults.
Line 511 The bit at the end.
THE MANDELBROT SET - AN INTRODUCTION
Once upon a time in a land far, far away there lived a bloke by the name
of Benoit `Benny' Mandelbrot. He was quite into Mathematics and
discovered the imaginatively named `Mandelbrot Set'. This is like a map
which can be magnified and magnified and further magnified without getting
dull, whereas most maps are staggeringly dull whether you magnify them or
not.
The technology to produce such weird images as the basic Mandelbrot
Set (which you see immediately after the title screens) hasn't been around
for very long and no one really understands what's going on or why such
images are produced. But they do look great, so who honestly cares?
Associated with each place in the Mandelbrot Set, there is another image
called the `Julia Set' for that point. This program allows you to
investigate both types of image. Prepare thy retinas for a bashing and
enter the world of Chaos ....
RUNNING THE PROGRAM - AN OVERVIEW
The first thing to do, as always, is to make a backup copy of the disk.
It is a good idea to hide the original disk somewhere away from drunk
people, dogs, cups of tea, pterodactyls, etc.... The program can be run
from the desktop by double clicking on the file HENDYMAN.PRG
After the title screen, the program will plot the default image. When
you run the program for the first time, this image will be the basic
Mandelbrot Set. Once this has been done, the program gives you a gun-sight.
Once you have decided which bit of the image you want to magnify, all you
have to do is:
* Select the centre with the gun-sight.
* Click on the left mouse button to set it.
* Move the mouse to define the new image inside the flashing box.
* Click on the left mouse button again to plot this new image.
I have found that people can sit quite happily for hours and play with
this, even people who don't like computers and think that mathematics
is amazingly dull.
If the right mouse button is clicked whilst the gun-sight is on the screen,
the control panel magically appears. Clicking the right mouse button again
gives you back the gun-sight (i.e. this toggles the control panel). This is
the only thing that the right mouse button is used for - everything else is
is controlled by the left button.
This control panel enables you to set up various screen effects. These are
described in detail later.
DEPTH
Perhaps the most important variable is the `depth' variable. As the
magnification increases you will find, generally, that you will need to
increase this number to pull out more detail in your images and, in fact,
to see anything at all. The setting of the depth variable is best learnt
by experiment. However, if you have plotted an image and it looks a bit
bare, with clearly-defined smooth edges as opposed to crinkly multicoloured
ones, then the best thing to do is increase the `depth' variable by about
30 or 40 and then redraw the screen (click on centre of monitor, expand the
box to the whole screen and click again).
INTERRUPTING IN MID-PLOT
All you have to do is hold both mouse buttons down simultaneously to stop
the plotting. This gives you the gun-sight back. Now you can either carry
on zooming in or you can press the right mouse button to bring up the
control panel.
FRACTAL
The Mandelbrot Set is really a summary of the corresponding Julia Sets.
Confused? Good.
Every point in the Mandelbrot Set image has a Julia Set to itself. Each
Julia Set can be magnified indefinitely, but, unlike the Mandelbrot Set,
they are quite obviously self-similar. Even more confused? Even better.
`Self-similar' means that magnifying a part of an image results in a new
image which looks the same as the one that you started with. You can carry
on magnifying, and it will carry on looking the same.
You can plot the Julia Set for the point you are centered on by clicking
on `Fractal' in the control panel.
You can investigate this new image as normal, zooming in and out, changing
the depth, rotating the colours, etc., etc., etc., and to return to the
place you came from in the Mandelbrot Set, click on `fractal' again.
It is interesting to note that all of the black in the Mandelbrot Set is
connected - there is only one black area. It may seem that there are many
areas of black surrounded by colour, but there is always a black path
leading through the colour and joining the black areas together.
ROTATE
Many hours of fun can be had by just zooming into the Mandelbrot Set and
maybe having the odd shifty at the Julia Set for the point at which you
are looking (always the middle of the screen).
You might also want to rotate the colour palette whilst your image is
being generated:
* Interrupt the plotting by pressing both mouse buttons simultaneously.
* Call up the control panel by pressing the right mouse button.
* Click on `Rotate'.
Click on `STOP/GO' to get it spinning, click on `IN/OUT' to change
direction, and alter the Electrolux spin-speed to taste using the arrows.
When you are happy, `Exit' and then `Continue' from the control panel.
Weird isn't it.
NEOCHROME FILES
When you have found a cool image and you want to save it to disk, yes,
you've guessed it, click on `Disk' on the control panel. This allows you
to save images in two different ways:
* As a list of parameters - numbers which describe your image.
* As a "picture file" - the image stored exactly as it appears on the
screen.
These "picture files" are Neochrome files, and are very big indeed (32K or
5 percent of a 726K disk). On the other hand, the parameter files are very
small indeed and still contain all the information needed to regenerate
your image, provided that you don't mind waiting for it to be replotted.
When you save a .NEO "picture file", the computer also saves the parameters
for the image. It does this because without this .PAR file of numbers, you
would only be able to display the picture and would not be able to carry
on zooming in.
WARNING - If you accidentally lose a .PAR file, the image is lost for good.
The computer must have this file in order to load your saved image, and
cannot simply load the "picture file". To prevent accidental loss, all .PAR
files are created in a "write-protected" state, so if you want to delete
any, you must do so very deliberately. If you want to delete a lot of these
then the best way of doing so is probably to reformat the disc.
Loading a .PAR file causes the program to automatically start regenerating
the image. If you just want to remember a nice image and don't want to
use up disk space, save it as a .PAR . You can save well over 6,000 .PAR
files on one 726K disk compared with only 22 .NEO files.
SPEED
One way to produce an image is to calculate the colour of every pixel on
the screen. This is fast, but there is a faster way to produce an
image which is insignificantly different. This involves leaving out some
pixels and filling them in later. So the `SLOW' option calculates every
pixel, and the `FAST' one is a bit cleverer and a lot quicker.
This option is here because, in really strange circumstances, the `FAST'
option might produce a slightly incorrect or distorted image, so
you the user have the power to see the perfect one if you don't mind
waiting longer. In tests, 99.9999 % of cat owners couldn't tell the
difference between the `FAST' and `SLOW' options!
SOME NOTES ON THE MATHS LIBRARIES
DISCLAIMER: This program works perfectly well with automath always set to
`ON', which automatically chooses all the maths routines for you. However,
if you do wish to turn automath `OFF' and choose for yourself, then you
can.
In this program, there is a lot of talk about `Maths routines'. What are
they? Well, in order for the computer to be able to calculate any images
and to show anything on the screen at all, it has to be able to add,
subtract, multiply, divide and do lots of other things with numbers. This
may appear obvious, silly and trivial, but it's not as easy as it sounds.
The numbers which have to be remembered and used can be very big or very,
very small. For example, if you zoom in only four or five times, then the
computer is working with about 0.0001 for the sides of the image! And at
the same kind of magnification, you may need five hundred to a thousand
for the iteration depth in order to see all of the detail, so we must be
able to cope with a huge range of numbers at the same time.
A `Maths routine' or `Maths library' is a bit of program which can do
these things - addition, multiplication and so on. Each one can handle a
different range of numbers and takes a different length of time to work out
the answer. This program has seven different libraries - like having seven
different people whom you can ask to do a calculation, e.g.
Fred can multiply numbers between 1 and 100 and takes 1 minute every time.
Freda can multiply numbers between 1 and 500 and takes 2 minutes.
John can multiply numbers between 1 and 1,000 and takes 5 minutes.
Joanna can multiply numbers between 1 and 100,000 and takes 10 minutes.
... and so on.
Now, you know that Joanna will always be able to give you the answer, but
she will always take ten minutes. If you are only using small numbers, then
it will be much quicker to ask Fred. So, you must look at the numbers that
you are dealing with and decide who to ask. This is what the program does
when automath is `ON'.
WHAT THE MANDELBROT AND JULIA SETS ARE ALL ABOUT
All of the action takes place in something called the `Complex
Plane' as Mathematicians say, just to confuse everyone. The
pretty images are generated by a remarkably short and simple program.
Whereas the version on your `Trendy Handy Randy Hendy Bendy Mandy' disk
is written in nice and fast assembly language, it can also be written in
a language such as basic. Below is a program in basic that will plot the
Mandelbrot Set:-
10 sx=0 : for cx = -2 to +2 step (4/320)
20 sy=0 : for cy = -2 to +2 step (4/200)
30 gosub 100
40 plot (sx,sy,colour)
50 sx=sx+1 : Next cx
60 sy=sy+1 : Next cy
70 end
100 x=0 : x2=0
110 y=0 : y2=0
120 count=0
130 y=2*x*y+cy
140 x=x2-y2+cx
150 y2=y*y
160 x2=x*x
170 count=count+1
180 If count = 30 then colour=0:Return
190 If x2+y2 >= 4 then colour=count:Return
200 Goto 130
As you can see, this program is not overly complicated. It is
just two `FOR-NEXT' loops which select every pixel on the screen and
decide what colour to plot it in using the subroutine at line 100.
The screen can be regarded as a piece of squared `graph' paper. Each pixel
on the screen is referenced by a pair of co-ordinates - e.g. the pixel at
the middle of the screen is (0,0) and the top right hand corner is (2,2).
This means that some pixels are evidently not referenced by integers - you
can have a pixel at (0.5,0.3).
The colour for each point depends only upon its co-ordinates.
This program simply works like a production line. In one end you put a
stream of co-ordinates - (0,0) (0,1) (1,1) (0.3,7) (-2,0.5) - and out of
the other end come the correct colours for each of these pixels - red,
blue, yellow, green, black. As soon as these colours emerge from the
production line, they are plotted on the screen. This is why the image is
gradually built up line by line.
The colour is calculated from the co-ordinates by a process of repeated
iteration. The point is transformed into another point by a set
Mathematical method. This new point is similarly transformed into another
new point, and this process is repeated until you get a point which is
outside of a certain region on the `graph' paper (a circle of radius 2
around the center of the paper). The colour of the starting point is very
simply the number of transformations, or `iterations', performed before the
resulting point leaves the circle.
EXAMPLE
To find the colour for point (1,1) - first transformation produces new
point (0.3,0.5) which is still inside the circle - transforming this new
point produces (1.1,-0.2) which is still inside the circle - transforming
this point produces (2.5,1.3) which is outside the circle. Therefore, the
pixel at (1,1) is plotted in colour 3 because it took 3 iterations to
produce a point outside of the circle.
The iteration depth (controlled by the `Depth' option in the control panel)
sets the maximum number of transformations which the computer allows itself
to perform on any point. If after this maximum number of iterations, the
point produced is still inside the circle, then it is plotted in black and
the program continues to the next point fed into the production line.
FULL DESCRIPTION OF THE PROGRAM OPTIONS
Quit This returns you to the desktop or where-ever. Note that
this only works on an Atari 1040ST at the moment. If you have
an STe then `Quit' will not work properly and you will need to
reset the computer, I'm afraid. Sorry about this, but I haven't
had the time to run more thorough tests on the STe.
Restart This returns the program to the state it was in when it was
originally loaded.
Info General information about the program
Disc File selector allowing loading and saving of .NEO and .PAR type
files.
System Gives the `at a glance' state of the variables and flags.
Depth Iteration depth entry for bringing out detail. Numbers can be
entered directly from the keyboard or by using the arrows.
Rotate Palette rotation controls.
Continue Continues a plot which had been interrupted.
Copyright Slightly modified legal protection for the programmer.
Fractal Switches between Mandelbrot and Julia Sets. If you can't remember
which type of image you are currently investigating, then look at
the `SYSTEM' option (above).
Speed Toggles between slow and fast plot algorithm.
Aspect Selection of Full Screen AND/OR Aspect Ratio Correction.
Quickmath Activates fastest maths library and over-rides all other maths
format options. If this maths format will not give an accurate
image, then this option will be automatically disabled and the
best, most economical format will be selected instead.
Automath When set, program automatically chooses `best' maths format.
Maths When Automath and Quickmath are both `OFF', allows the user to
select the maths routines used.
HOW TO SET YOUR OWN DEFAULTS
Note that after starting up, the program looks for a HENDYMAN.DEF file
with which to initialise the system variables. A personal default file can
be created and saved so that you can get the program doing just what you
want as soon as it loads. If this file is not in the starting-up
directory, the program will use its own preset defaults.
This section describes all of the variables and flags that can be placed in
the file HENDYMAN.DEF. These do not have to appear in any particular order,
but they must be spelled correctly, otherwise they will be ignored!
cx0 and cy0
-----------
These two numbers together define the centre of the Mandelbrot or Julia Set
image in the plane as a pair of co-ordinates.
Defaults to cx0=0, cy0=0.
sidecx and sidecy
-----------------
These two numbers together define the side lengths of the image - how much
of the set around the centre, (cx0,cy0), that you want to display full
screen. In other words these two numbers define the magnification of the
image.
Defaults to sidecx=5.69, sidecy=4.
sidesx and sidesy
-----------------
These two numbers can be used to redefine the size of the Atari screen.
This is useful for `having a quick look' at things because instead of
plotting images 320 by 200 you can plot them, say, 80 by 50. This divides
the time taken to plot them by four. All images are automatically centered
on the Atari screen in this version.
Defaults to sidesx=320, sidesy=200.
depth
-----
This number defines the iteration `depth' used in the default image. This
can be changed directly whilst the program is running.
Defaults to depth=30.
pxm and pym
-----------
These are distortion constants to `mangle' Mandelbrot Set images. These
new images are direct cousins of the basic Mandelbrot Set we all know and
love, unlike the Julia Sets, which are generated in a different way.
If you choose large (i.e. greater than about 1.4) values for
either of these constants, then it is possible that the plotting will slow
down noticeably. This is because more powerful maths libraries must be used
which are slower. This is not a serious problem because distorted
images from large distortion constants are really quite boring. If you
don't believe this then try it for yourself.
Defaults to pxm=0, pym=0.
pxj and pyj
-----------
These two distortion constants `mangle' Julia Set images in exactly the
same way as those that `mangle' the Mandelbrot Set images described above.
Defaults to pxj=0, pyj=0.
max_error_mand and max_error_juli
---------------------------------
These two constants give the automath option the information for `deciding'
when to advance to a more powerful maths library. If these are set too
high, say both at 10, then sooner or later you will see images begin to
break up and finally become very untidy and ragged.
If you feel that an image is tending towards this raggedness and you want
to go to a more powerful maths library to make sure of a correct image,
then turn automath `OFF' and increase `Maths' by one in the main program
control panel.
Defaults to max_error_mand=1, max_error_juli=1.
fractal
-------
This chooses which fratal is plotted as the default image. The Mandelbrot
set is 0, Julia sets are 1.
Defaults to fractal=0.
speed
-----
Chooses between fast and slow plotting algorithm. Fast is 1, slow is 0.
Defaults to speed=1.
aspect
------
Chooses default options for `Aspect ratio' and `Full screen'.
0 - Full Screen OFF Aspect OFF.
1 - Full Screen OFF Aspect ON.
2 - Full Screen ON Aspect OFF.
3 - Full Screen ON Aspect ON.
Defaults to aspect=1.
quickmath
---------
Default option as to whether the `Quickmath' maths routines are enabled on
starting up. ON is 1, OFF is 0. Note that when this option is set, you may
see a little distortion in the images produced at higher magnifications.
It probably won't be noticeable, but if it is then you should turn off
quickmath and future images will be accurate. The program will do this
anyway if it thinks there is too much distortion.
Defaults to quickmath=1.
automath
--------
Default option as to whether the `Automath' maths routines are enabled on
starting up, and only has any effect if `Quickmath' is `OFF'. ON is 1,
OFF is 0.
Defaults to automath=1.
maths
-----
Chooses the default maths library, and only has any effect if both
`Quickmath' and `Automath' are `OFF'. Libraries are numbered from 1 to 5,
with 1 being least powerful and fastest, and 5 being most powerful and
slowest.
Defaults to maths=1.
An example of setting ALL of the defaults is the file hendyman.def which
should be on this disk. This contains the following:-
cx0 = 0
cy0 = 0
sidecx = 5.69
sidecy = 4
sidesx = 320
sidesy = 200
depth = 30
pxm = 0
pym = 0
pxj = 0
pyj = 0
max_error_mand = 1
max_error_juli = 1
fractal = 0
aspect = 1
speed = 1
quickmath = 1
automath = 1
maths = 1
THE BIT AT THE END
I'm planning to expand the program to do plenty of other weird stuff
whilst keeping the thing usable by people who aren't interested in the
maths side of it. Since this has been released as Shareware, I can only
do this and give YOU more features if I get some feedback from THIS
version.
It seems that the big companies that get fat selling software for
horrendous prices have failed to kill off Shareware. This means that there
are enough people out there who have realised that everybody (except big
money-grabbing companies) benefits from the Shareware idea.
If you think that this software is wikked, and want to see newer and
better versions, then please send five pounds to:
HeNdYsOfT,
4 Lordswood,
Silchester,
Reading,
Berks,
RG7 2PZ.
Also, if anybody finds any unexpected `features' (i.e bugs) in the program
then I would greatly appreciate a note.
Any suggestions or criticisms are also welcomed. Tally Ho......
Endorsment:
This software was developed on an old battle-scarred Atari 1040ST called
'Herman', with a knackered mouse and a very ill disk-drive.
All coding by Hendy The Mad Mathemagician.
The `Cheers folks section'
Many Thanx to the YAK for encouragement, Irni for being awesomely
intelligent, Lee for the use of his `High Level' brain and the zoom box
actioning, Keeff The Tall Thin Being for the design of half of the disk
interface and you for trying out this program.