home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
j
/
juliaanim
/
!JuliaAnim
/
!Help
< prev
next >
Wrap
Text File
|
1992-09-24
|
30KB
|
568 lines
!JuliaAnim (Quadratic Julia Set Real Time Animator).
By Ivar Wind Skovgaard.
This is version 1.52, which has been finished Thursday, 24 Sep 1992.
Introduction:
This program, I hope, can be used by everybody to see some beautiful
animated sequences of Julia sets. That is what the primary purpose of it is.
However it can also be used to gain some insight into the fascinating
objects that Julia sets are.
!JuliaAnim displays quadratic Julia sets and uses the inverse iteration
method to allow you to explore the effects of different complex constants in
the formula in 'real time'.
By moving the mouse or using the cursor keys you can change the complex
constant in the expression for the Julia sets and (because of the speed of
the inverse iteration method as well as ARM machine code) immediately see
the shape of the set change on the screen (which is what I call 'real
time').
In addition to showing Julia sets the program can also display 'Mandelbrot
orbits' - the forward orbit of the current value of c as it would be when
generating the Mandelbrot set - these orbits are of course also animated.
Using the program:
Double-clicking on the !JuliaAnim icon will start !JuliaAnim, which takes
over all the processing time of the machine (except for interrupts).
The program is controlled from the keyboard or the mouse. Initially the
mouse is selected for control and by moving it you change the complex
constant c shown at the bottom of the screen. This constant determines the
shape of the Julia set and it is only constant in the sense that it is
constant for a given image. The whole point of this program is to see what
happens when you change this constant (confused? - well you probably still
will be after reading the rest of this text if you ever get that far).
The following keys can be used with both mouse and keyboard control:
A : Toggles automatic animation on and off
(during automatic animation the constant c follows the edge of
the cardioid and the greatest circle of the Mandelbrot set).
H : Display a help screen.
I : Toggles the background image of the Mandelbrot set on and off.
J : Toggles Julia sets on and off
(if Julias are switched off then orbits are switched on).
M : Toggles between mouse and keyboard control.
O : Toggles Mandelbrot orbits on and off
(if orbits are switched off then Julias are switched on).
P : Toggles mouse pointer on and off
(when on the pointer is also shown during keyboard control
and will then follow the current value of the constant c).
R : Toggles random automatic animation on and off
(during random automatic animation the constant c
moves in a direction which changes randomly).
T : Toggles text on and off
(with text off and some automatic animation on
you can let the program run indefinitely
without worrying about burn-in on the monitor).
V : Toggles mirroring of orbit points on and off
(mirroring (around 0+0i) of orbit points can be used, if the
Julia set is connected to display extra points belonging to
the Julia set, and if the Julia set is unconnected to
display extra points not belonging to the Julia set).
# : (On the keypad) Changes the framerate of animations by
cycling through 25, 16.7, 12.5 and 10 frames per second
(with Shift held down the cycling is the other way round).
On an ARM2 machine the program can't quite manage 25 frames
per second (due to the limited temporal resolution of the
centisecond timer - I think). As I have not tried the
program on an ARM3, I don't know if the extra speed
solves the problem, nor can I say how it will work
on the ARM250 based machines.
F1-F12 : Choose one of twelve preset complex constants
(these are the ones from page XII of 'The Beauty of Fractals').
Home : Return to the initial complex constant c=-0.08+0.66i.
Copy : Redraw the image with the current complex constant c.
Esc : Quit the program.
In addition the following keys can be used only during keyboard control:
Cursor keys : Changes the complex constant c in steps of 0.01
(when Shift is held down the steps are 0.05 but when Ctrl is
held down (without Shift) the steps are only 0.001 and the
number of frames per second is lower - incidentally Ctrl
also decreases the frame rate during mouse control).
This program is not very accurate and it would not be well suited for
zooming into the images. Because of that the display is fixed to a part of
the complex plane with real values ranging from -2 to 2 and imaginary values
ranging from -1.6 to 1.6. This is not as bad as it may sound because Julia
sets do not increase in complexity when you magnify them and unlike the
Mandelbrot set will usually display all their unique features on the
macroscopic level.
For complex constants with a large magnitude (distance from 0+0i) the code
will give an address exception error (due to overflow). To avoid this the
program will not allow the absolute values of the real and imaginary parts
of c to exceed 3.5. This is of no great significance, as very few Julia sets
with values of c outside this range would be contained by the screen. The
mouse pointer can move off the screen to allow the exploration of complex
constants to the limits.
The orbits are quite easy to calculate but are even more sensitive to errors
in the calculations due to the nature of normal forward iteration (inverse
iteration is attracted to the correct set and thus small errors will
eventually be 'forgotten' while forward iteration as used for the orbits
moves away from whatever set you want to find and thereby enlarges any
errors that occur) and are therefore not quite reliable (at least I don't
think so) but they are pretty anyway.
What can quadratic Julia sets be used for:
Quadratic Julia sets are based on the quadratic formula:
z(n+1)=z(n)^2+c, where c is a constant for a specific Julia set.
Both c and z(n) are complex numbers, which implies that they consist of a
real part and an imaginary part (which is a real number multiplied by the
imaginary unit i, which is the square root of -1). Complex numbers were
invented a long time ago in order to solve some mathematical problems, or
something like that, and they have since then been applied to many parts of
science (they are useful in treating electric circuitry and necessary in
quantum mechanics).
The Julia set then consists of all the points z(0) for which the series z(n)
stays confined within a finite area for all values of n. It is hard to see
any immediate connection between this and the real world, but in mathematics
it can be very useful to explore a fairly simple formula to gain knowledge
about it and then use this knowledge on more complicated problems.
Furthermore it is common practice (e.g. in physics) to reduce a complicated
problem to something simpler to be able to solve it, and a quadratic formula
is a very common example of a simple but good approximation to a more
complicated description. In my view none of this really matters as the
beauty of the sets should be sufficient justification for making them.
What to look for - and what not to look for:
Primarily you should look for a lot of pretty images and sequences of
images. However there are a few things that are worth noticing as they
actually have something to do with the mathematics behind the sets.
Playing around with the program (I hope you have done so by now) you may
have noticed, that some Julia sets seem to be a single connected set while
others seem to consist of a few large pieces, and some seem to consist of
many small pieces. It turns out, when investigating the sets theoretically,
that the quadratic Julia sets can be divided into just two categories: Those
that are