home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 222
/
222.d81
/
t.microscope
< prev
next >
Wrap
Text File
|
2022-08-26
|
11KB
|
403 lines
u
MANDELBROT MICROSCOPE
by Neal Butler
[DAVE'S PRE-RAMBLE:] If computers
would never have word processors or
spread sheets or 3-D Virtual Reality
or email or the Web, it would have
been sufficient for Mandelbrot to have
discovered his Set.
What, you may ask, [is] the
Mandelbrot Set? Just numbers, ma'am.
Nothing but numbers. But when certain
numbers -- real and unreal -- are
calculated over and over, the result
hangs around a certain point. I
believe this is called "strange
attracters." Other pairs of numbers,
calculated the same way soon take off
for infinity and never return.
When Benoit Mandelbrot of IBM put
a grid of numbers to the test a
strange thing occured. Unique and
recognizable areas appeared as the
results were graphed.
Like a slow-scan transmission
from an interplanetary satellite, the
image builds on the screen. An island
with a strange big-butted bug shape
appears, with a somewhat hairy coast
line. But move in closer, and behold!
the features of the coast repeat
themselves, with iterated variations.
Move in even closer, and the rough
places prove to be comprised of the
same kinds of shapes.
The official name is "fractals."
I think an old rhyme says it better:
Little fleas have lesser fleas
Upon their backs to bite 'em.
The lesser fleas have smaller still,
And so, ad infinitum!
[FENDER'S PREMUMBLE:] Soon after I
got my CMD SuperCPU, which increases
the clock speed of the C-64 from 1
MHz to 20 MHz, I looked for some
programs that could show off what the
speed increase can do. This program
was one of the first I tried and it's
great at 20 MHz. It doesn't look as
though the Mandelbrot is plotted 20
times as fast, but it's fast enough
to make it much more interesting to
watch.
[DAVE'S INTERRUPTION:] The SuperCPU
will run at 20 Mhz -- unless screen
memory needs to be refreshed. This has
to be in the C-64 itself, and cuts the
effective speed to 8 - 10 Mhz.
[FENDER AGAIN:]
A great companion piece for
MANDELBROT MICROSCOPE is Ian Adam's
JULIA SETS, which we've also upgraded
and improved. It'll probably appear
on next month's issue. Of course you
don't need a SuperCPU to enjoy the
incredible complexities of fractals,
but the faster they're plotted the
more we feel like gods overlooking
our little pocket universes. And we
all need that from time to time.
[DAVE AGAIN:] Yep! JULIA SETS is
slated for 223.
[EMULATOR NOTE:] We don't have a
SuperCPU on our emulator, but we [do]
have Warp Speed. On our 950 MHz
Gateway, Warp cranks at 3500% --
faster than the SuperCPU by 15 times.
Kicking in Warp is easy: just
press <Alt-W>. The same turns it off.
Any sound is cut out, but for a
number cruncher like this program,
you don't have sound anyway.
So I pressed <Alt-O><S> and
turned off the sound all together.
Then I booted up WinAmp and played my
favorite music, downloaded off
Napster. Songs like "Boris the
Spider" make watching the scan lines
march across the screen a real
thrill.
[Now] this thing is [RRREALLY]
addictive. I must quit so you can
receive this issue.
Here are Neal's slightly edited
docs from the original publication of
MANDELBROT MICROSCOPE from LS #86:
The "Mandelbrot" set (named after
Benoit Mandelbrot of IBM) is the set
of complex numbers c such that the
iteration z=z^2+c remains finite.
This set can only be explored with a
computer program due to the large
number of computations required.
Even on a computer, the enormous
number of computations take up more
time than most people are accustomed
to when dealing with computers.
After all, computers can multiply
almost instantly, right? Well -- not
really. It happens VERY quickly, but
not quite instantly
So when you compound tens of
thousands of "near-instants", you get
moments. Moments become seconds.
Seconds become minutes. A C-64 can
compute your entire city's fiscal
budget in seconds. Calculating a
Mandelbrot image involves much more
math. A typical image will take about
fifteen minutes to produce. Some much
faster, some MUCH slower. It depends
on the nature of the image.
For speed, I chose a 160 X 100
format. Once you've found the image
of your dreams, you can press "I" and
double the resolution to 160 X 200 by
interpolating. More on that later.
The program allows you to choose each
of the four colors. Color 0 is used
for the border and for points which
are nearest the set.
[NOTE:] Areas of the Mandelbrot image
that contain color 0 will take the
longest time to plot. Unfortunately,
that's usually where most of the
action is.
When you boot MANDELBROT
MICROSCOPE, it will automatically LOAD
and display the original Mandelbrot
image. While this graphic screen is
showing, these keys are active:
H or SPACE - for the help screen/menu
X - Cursor On Cycle 6x/10x/Off
C - Change Cursor Color Cycle 0-15
CRSR keys - maneuver cursor
M - magnify (zoom in) at cursor
Pressing X will pop up a white
box-shaped cursor. You use it to pick
a section of the Mandelbrot to
enlarge. The larger box magnifies
6.7x. Press X again and the box will
shrink to its 10x perspective.
Pressing X again will turn the cursor
off. The color of the cursor box can
be changed by pressing C while the
cursor is showing.
You can exit the graphics mode by
pressing G and manually enter the
magnification by pressing M. You can
specify any magnification from 1 to
25X the current magnification. The
maximum magnification allowed by the
progam is 1,000,000! One of the
curious things about the Mandelbrot
set is that there is always something
interesting to see at any
magnification.
[THE HELP (OR TEXT) SCREEN]
[-------------------------]
You can type H or SPACE for the
help (or text) screen. G will toggle
between the graphic and text screens.
The help screen shows all of the
active keys in both modes: Graphic
and Text. Here's what you'll see on
the Text screen:
At the top, the current
magnification is shown along with the
relative position of the viewing
area. While this screen is showing,
these keys are active:
G - Toggle display
L - Change iteration limit
M - Magnify at cursor
C - Change four-color scheme
R - Change color repeat count
S - Save image and data
D - Load Image
The iteration limit is the
maximum number of times the program
will iterate before quitting for each
point. The maximum limit is 255.
Points which reach the limit are
assigned to color 0 (normally black),
as is often done in published photos.
The color repeat count determines
how many times each color is used.
Changing the colors and the repeat
count does not require much
computation, so you can experiment
for the best picture. Using this
feature can dramatically change the
look of your image, and even reveal
hidden patterns. Each of the 16,000
points in the display represents a
different value of c, and the color
displayed at that point depends on
how many iterations were completed
before the computation diverges. (If
the absolute value of z ever exceeds
2, the iteration will diverge.)
The images can also be saved and
loaded from disk. The actual
iteration values are stored along
with the display so that you can
modify stored pictures without
starting from scratch. However, this
means that a saved file is 95 blocks
long! Be sure you have enough room on
a disk before saving. Up to six
images can be stored on one 1541
disk and of course many more on a
1581 or CMD native mode partition.
The last step of playing with a
picture should be the interpolation,
which doubles the resolution to 160 X
200. There isn't enough memory to
store these iteration values, so any
change to the image (except changing
the colors) results in lowering the
resolution to the basic 160 X 100.
The program comes with the
original Mandelbrot image, named "1"
with brackets around it. When you
save a zoomed image, you don't have
to use numbers; you can use any
filename you want. Don't enter the
brackets -- they'll be added for
you.
I find that gradually increasing
the magnification and iteration limit
is the best way to zero in on
interesting areas, much like using a
real microscope. Increasing the
iteration limit