home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
netdor3.zip
/
DISK_11
/
IMAGE10.ZIP
/
BOOK
/
fglobe.inf
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1993-06-29
|
62KB
|
301 lines
ΓòÉΓòÉΓòÉ 1. Fractal Globe ΓòÉΓòÉΓòÉ
Welcome to the Fractal Globe information and help window. For some general
information about Fractal Globe, select one of the following topics. If you
just want to find out how to get it to do that neat thing where it spins
around, take a look at the Options Window help.
What is Fractal Globe?
Why did I do it?
What is a Fractal?
How does it work?
Where theory meets reality.
Disclaimer
This program is not guaranteed to work or be bug free, so if it hangs your
machine, it's not my fault. The information in this help file are miscellanous
ramblings of a Computer Scientist who was bored one day. I am not a
mathematician, and my thoughts on the definition and implications of fractals
may be inaccurate.
Jay Crowley
ΓòÉΓòÉΓòÉ 1.1. What is Fractal Globe? ΓòÉΓòÉΓòÉ
Fractal Globe generates a sphere using an algorithm that follows the principles
of fractal geometry. The algorithm begins with a perfect sphere and alters the
distance between various points on the sphere and the center to give the
(imaginary) perception of height. Then the height is mapped into various
colors, coincidentally enough, to give the sphere a very earth like appearance.
Once the sphere is completely mapped out it is drawn on the screen for all to
see.
ΓòÉΓòÉΓòÉ 1.2. Why did I do it? ΓòÉΓòÉΓòÉ
There are several reasons that I wrote this program. For several days after
work, I read Chaos, by James Gleick. A very good book that I highly recommend.
This book got me thinking about fractals for a few days, and I kicked some
interesting ideas around for a while. A few days later, as I stared at my
computer sitting on my desk, it ran a screen-saver that drew a landscape that
appeared to be based on fractals. I came up with the idea to write a fractal
sphere. I thought about it for a few days, and realized that I had never seen
any one else with such a program, and I wondered why. Was it impossible or
just really hard? As additional motivation, I thought it would be really neat
to watch. (I think I was right about that.)
After a bit of head scratching, a couple of practice attempts, and a lot of
algebra with pencil and paper, I managed to get it to work. After a little
polish and a few suggestions from friends, the idea was put to rest in a
totally useless but quite interesting graphical display.
ΓòÉΓòÉΓòÉ 1.3. What is a Fractal? ΓòÉΓòÉΓòÉ
Fractals were invented (discovered?) by your friend and mine, Benoit
Mendelbrot, at IBM's T.J. Watson Research Center in Yorktown, NY. The strict
definition of fractal, is fractional dimension, and is intended as a
measurement of an objects complexity. Fractals are useful for explaining
objects that traditional Euclidean geometry can't. An excelent example is the
Koch curve. This interesting little shape is created by starting with a
triangle:
Then, on each edge, place a triangle with edges one third the length of the
edge it's attached to:
Then on each edge of the new shape:
And then do it again, and again, and again...
The shape has some interesting properties. It has a finite area; you can place
an enclosing circle around it, but it has an infinitly long perimeter.
Like all fractals, this shape has the property that at various magnifications,
it has the same look and feel. It has the same features and complexity at any
magnification. As parts are magnified, they look pretty much the same as the
shape at normal size:
Traditional geometry is incapable of describing this shape, but in fractal
geometry, this shape can be measured.
Fractal geometry is excellent for describing things that happen in nature.
Clouds, for example, have a fractal quality. When you view a large cloud from
a long distance, and compare it to a smaller cloud that is closer, you have a
very difficult time telling the difference. They have the same organization,
and complexity at any size and magnification.
There are many other examples found in nature, such as the structure of blood
vesels, and the lungs in the human body; the turbulance pattern caused by a
fluid moving around a solid object; and, of course, landscapes.
ΓòÉΓòÉΓòÉ 1.4. How does it work? ΓòÉΓòÉΓòÉ
The Fractal Globe algorithm is based on an algorithm for making a triangular
shaped landscape. Given a starting equilateral triangle, each of the triangles
corners are randomly moved up or down from a zero height. There is an arbitrary
range that the corners are bound by:
The midpoints of each of the edges of the triangle are found, connected to form
four smaller triangles, and are moved up or down from their current position a
random amount, bounded by the same arbitrary range divided by two:
Each of the new line segments is cut in half, and each point moved up or down,
within the range which is cut in half again:
This continues on and on and on... until you have a nice landscape:
Transforming a bunch of triangles into a sphere shape requires a little
trickery. Notice how each of the interior points on the landscape above has
exactly six lines attached; six surrounding triangles. Ideally the sphere
would start out as a solid three dimentional sphere with several equilateral
triangles drawn on it, and each point where they meet would have six adjacent
triangles. Then, the landscape algorithm could be run against each of the base
triangles, to result in a beautiful three dimensional sphere, made entirely of
identically sized and shaped, infinitely small triangles.
ΓòÉΓòÉΓòÉ 1.5. Where theory meets reality. ΓòÉΓòÉΓòÉ
Unfortunately, it is impossible to make a sphere consisting of a finite number
of equilateral triangles. (At least it's really hard to imagine.) So the next
best thing was selected: A dodecahedron! A dodecahedron is a solid three
dimentional shape with twenty sides, each of which is an equilateral triangle,
but at each corner, there are only five adjacent triangles. Each of the
triangles edges are then curved outward, to make a sphere with a bunch of
almost equilatiral triangles drawn on it. Each triangle has 72 degree angles
at the corners instead of 60; a small innacuracy that is almost invisible. The
landscape algorithm is run on each of the twenty triangles to reveal a
beautiful three dimensional sphere made entirely of almost identically sized
and shaped, infinitely small triangles.
In theory, this algorithm would create a truly (almost) fractal shape.
Unfortunately, in reality, most computers have a finite amount of memory and
processing power. (I wonder when those infinite power computers will come.)
This makes it really hard to let the algorithm run forever on smaller and
smaller triangles. Instead a limit is set, and the base triangles of the
dodecahedron are subdivided only a small number of times.
Once the sphere is generated in computer memory, it is drawn on the screen. The
actual drawing is a lot less complicated than one would think. As the fractal
algorithm determines a position of each point on the sphere, it calculates the
coordinates in three dimensional space, giving each point an x, y, and z
coordinate. To draw that on the screen, the z coordinate is only used to
determine which triangles are on the front of the sphere, and then the x and y
coordinates are plotted directly on the screen in pixel coordinates.
To get the sphere to appear to rotate, the x, y, z coordinates are rotated with
a simple algebraic equation, and drawn the same way onto a bunch of images in
the computers memory. Each of the images is quickly trasfered from the image
in memory to the video memory of your screen.
It's the brain inside your head that fools you into thinking the image is three
dimensional.
ΓòÉΓòÉΓòÉ 2. The Options Window ΓòÉΓòÉΓòÉ
The Options Window allows you to set various options about how the globe is
generated and displayed. To get to the options window, select the Options...
menu item in the File menu.
The window is divided up into several sections. For infomation about any of
the individual sections, select one from the list:
Globe Detail
Generate New Globe...
Map Insets
Rotation
Apporiximate Memory Requirements
Once you have selected the options you would like to see, press the OK Button.
If the options you have selected take more than 5MB of memory, you will get a
warning box telling you so. See Approximate Memory Requirements for more
information.
If you have changed the options beyond all recognition, and you want to forget
it, press the Cancel Button.
If you need help, press the Help Button, but you probably already knew that.
ΓòÉΓòÉΓòÉ 2.1. Globe Detail ΓòÉΓòÉΓòÉ
The Globe Detail section determines how detailed the globe should be when it is
drawn.
The Recursion depth value, is the number of times the large triangles of the
dodecahedron are subdivided. (If you don't understand that and want to, take a
look at How does it work? and Where theory meets reality..) The recursion
depth determines the total number of triangles that make up the globe. The
higher the depth, the more triangles that are used, and the more detailed the
globe looks on the screen. The total number of triangles is calculated and
displayed in the Number of triangles field for your edification.
Warning: As the recursion depth increases, the total number of triangles, the
total memory required and the total time required increase geometrically. When
you add one to the recursion depth, the amount of memory and time required to
generate the globe increases by a factor of four. The recursion depth allows
you to specify a depth of up to 10, but most machines will only be able to
handle a recursion depth of up to 7. Pay attention to the Approximate Memory
Requirements as you change the recursion depth.
ΓòÉΓòÉΓòÉ 2.2. Generate New Globe... ΓòÉΓòÉΓòÉ
The Generate New Globe... section determines how often a new globe should be
generated and displayed.
If you select Only once, only one globe will be generated and displayed, until
you change the options.
If you select Every mouse click (left button), a globe will be generated each
time you click on the Fractal Globe window with the left mouse button.
If you select Every xxx Seconds., a new globe will be generated after the
number of seconds you specify has ellapsed. The countdown begins after a globe
is generated and drawn completely. If you have rotation on, the countdown
begins after all frames have been drawn, and before the animation has started.
ΓòÉΓòÉΓòÉ 2.3. Map Insets ΓòÉΓòÉΓòÉ
The Map Insets section lets you view the north and south poles of a globe.
(Assume that the axis of the globe is verticle. The north pole view will be
what you would see if you rotated the top of the globe towards you. The south
pole view would be the view if you rotated the bottom towards you.)
Check or uncheck the appropriate check boxes if you want to see the north or
south pole. The size of the north pole and south pole view is calculated as a
percentage of the globe size, which you can change.
ΓòÉΓòÉΓòÉ 2.4. Rotation ΓòÉΓòÉΓòÉ
The Rotation section lets you turn on the globe rotation animation, and to
specify various parameters to control how the animation looks.
If you want rotation animation, check the Rotate the globe check box.
The number of frames lets you specify how many pictures make up the animation.
The animation works by drawing a bunch of pictures of the globe, called frames,
in computer memory. The frames are then transferred to the screen very
quickly, very much like a cartoon or movie, to give the illusion of movement.
The more frames you have, the smoother the motion will be. The Number of
degrees that the globe will rotate between frames is calculated for you to give
you an idea of how smooth the motion will be. It can take a while for the
frames to be drawn, so the manu bar of the Fractal Globe window will tell you
what frame number is in progress, to give you an idea of how long you have to
wait for the animation to start.
The Take xxx seconds per revolution lets you set how fast the globe should
rotate. Fractal Globe will calculate how long it should wait before putting up
the next frame of the animation so that the globe will make exactly one
complete rotation in the number of seconds you specify. This number is only an
approximation; the accuracy depends on how fast your machine is, and how loaded
the processor. If your machine is doing other things the animation will slow
noticeably. A rotation time of 0 seconds tells Fractal Globe to rotate the
globe as fast as your machine is capable of.
If Draw off screen only is checked, each frame of the animation will be drawn
out of view, into computer memory. While the frames are drawn, the Fractal
Globe window will remain black. If you would like to see the frames of the
animation as they are drawn, uncheck this check box, and each frame will be
drawn in the Fractal Globe window. It takes about twice as long for the frames
to be drawn on screen, as off.
Warning: The rotation animation takes a lot of memory. A chunck of memory is
used for each frame to hold the picture. The amount of memory required depends
on the number of frames, and the size of the window. The more frames you have
and the larger the window the more memory will be required. To get a smooth
animation, you should make the window small, about 10% of the screen. If you
use too much memory, your machine will slow noticeably, and may crash.
ΓòÉΓòÉΓòÉ 2.5. Approximate Memory Requirements ΓòÉΓòÉΓòÉ
The Approximate Memory Requirements section will tell you approximate amount of
memory that is required for the options you have selected. The amount of
memory is calculated based on the settings in the Globe Detail section, the
settings in the Rotation section, and the size of the window.
The abbreviation 'Kb' is Kilobytes, thousands of bytes, and 'Mb' is Megabytes,
millions of bytes. Since you are running OS/2, your machine probably has 4Mb
to 16Mb of memory. It's not wise to assume Fractal Globe can use all of it.
You will be warned if you press the OK Button, and the total memory required is
more the 5Mb. It is usually safe to use 1 to 2 Mb of memory, up to about 5 Mb
on faster more powerful machines. If you have rotation animation on, be wary
of the difference between the current window size, and maximized window, and
take this into account when you change the size of the window.