home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk371.lzh
/
Fractals
/
frac.doc
< prev
next >
Wrap
Text File
|
1990-10-08
|
36KB
|
1,040 lines
(C) 1990- Programgjörarna, Ronnie.
Hello to all of you reading this file.
This program is dedicated to Mr Stallman of MIT.
He wrote EMACS and have developed GNU ( Gnu Not Unix ).
He is also considered to be the best programmer in the world, ever.
We all want to be as skilled programmers as Mr Stallman,
and to be called Hackers.
( see below for definition of hacker. )
FIRST OF ALL:
We take no responibility whatsoever regarding the function of this
software, you use it on your own risk.
This program is as it is, with no warranty.
If you use it and it crashes your computer or destroys some data
or makes any damage in any other way, we take no responsibility.
Thou hast been warned.
This software consists of 10 files:
The seven source files:
frac.c / main program
menu.c / variabel declaration and
initialization for menus and stuff.
formulas.c / calculation formulas
formulas1.c / formulas for menu 2
wilbm.c / function that writes picture as iff-ilbm
colorwindow.c / colorwindow function
defs.h / constant definitions
The executable program file with icon:
frac / executable program
frac.info / program icon
The documentation file:
frac.doc / this file
HOW TO COMPILE THE SOURCE:
We have used Aztec c v. 3.6 to compile the program,
but I think it will work with Lattice as well.
cc menu
cc frac
cc formulas
cc formulas1
cc colorwindow
cc wilbm
ln frac.o menu.o formulas.o formulas1.o colorwindow.o wilbm.o m.lib c.lib
It uses Motorola fast floating point to gain some speed.
NOTE. The program needs mathtrans.library, so if you use a
modified workbench diskette to boot from, make sure you
have this library in the LIBS directory.
FIRST WE WANT TO MAKE CERTAIN THINGS CLEAR:
This is public domain, that is, you may copy this software and
give to your friends if you like.
( If you like the program, we would in fact appreciate if you
spread it as much as you could. )
But there are certain rules that you MUST obey if you do so,
1, You may not SELL the program, that is, take money for giving
someone a copy.
2, You may not ALTER the code or text files.
This one is IMPORTANT, I don't care very much if you break the
other rules, but you may NOT alter the code and spread the copy.
3, When you give someone a copy of this software, you must
copy all of these file.
4, If you use the program and like it, and you feel generous,
Please, buy me a beer if you meet me at Ryd's Herrgård in
Linköping.
( In other words, this program is Beerware. )
GREET DEPARTEMENT:
Greetings to ( in alphabetical order )
Klas Elmby,
Jonas Nywall
and Mr Richard Stallman.
INFO:
We are some swedish students that are going to write some
software for the amiga and ibm-pc.
We call ourself programgjörarna ( program makers ).
We aim to write good public domain programs, and we want
YOU to use our programs. ( and like them )
We think Mr Stallman is God, and our religion is the language of C.
Please write to us if you ( like we do ) think Mr Stallman is
great and C is the ultimate language.
If you are a shithead that only writes useless demos or cracks
programs, don't bother.
We won't even read your letters.
We have ways to detect shithead letters without opening them.
If it smells like coca-cola and sweat, then it is from a programmer.
If it smells like shit, it is either from a cracker or a swapper,
'cos they don't wipe their asses when they go to the lavatory.
If you enjoy programing the amiga or the ibm, you are welcome to
write to us, but please also send us an self addressed letter
with stamps on it if you do,
'cos I have no intention to spend a fortune mailing letters.
If you wish to contact us, write to my ( I'm Ronnie ) address
below.
Also if you have the p.d. program C-ROBOTS, and think your
robot will beat mine, send me your robot and my robot A-1 will
disintegrate it. ( or so I hope )
We also plan to convert this program to IMB computers, ( only VGA and
super-VGA ), and Jonas Nywall had almost finished the first working
version of the program when his hard-disk crashed, unfortunately
he had no backups of the source files.
If you are a user of a computer net ( such as DECNET/SUNET ) you
can reach me with e-Mail, my address is
ronnie@lysator.liu.se
( Note that the computer runs unix and there's been some problems
reaching it from some vms machines, so I can not guarantee
that you'll get through to me. )
( also note that the computer is down during the summer. )
Note. If you are a swapper , a cracker or a demo-s.k. programmer
please, don't bother to write to us.
Coding YES,
Swapping NO.
We are not interested in swapping stolen programs,
We are REAL programmers, we CODE, not copy.
HACKERS:
What is a hacker?
( Mr Stallman is a Hacker )
( In the late 60's at MIT, the young students that were very
skilled in programming computers were called hackers.
( The keyboard sounds hack,hack,hack... )
So, a hacker means someone that is very skilled in programming,
and can make a working program in little time. )
( The word hacker are now used on people who steal and crack
programs, that is a misuse of the word.
These thiefs should be called crackers, and are known as
idiots. )
SHITHEADS:
To all of you crackers out there:
We all wish you dead.
One should respect the very hard work of other programmers
and not steal their work, change a few bytes and take all
the credits of writing the program.
Shame on you.
To all of you swappers:
We all wish you dead too.
You don't even know how to use a computer properly,
you just distribute stolen software.
I do not have anything positive to write about you.
To all of you demo-programmers:
So called programmers.
Why don't you learn how to use a multitasking-op.sys. properly.
It isn't that hard.
The amiga is far more advanced than old 8-bit computers, why
do you not learn how to program it the way it should be ?
Is it to hard for you, to learn real programming ?
Do you think a real programmer would write a program that
sends the op.sys. with the express elevator straight up into
the big fast.mem. in heaven.
If he did, he would probably very soon be looking for another job.
No one needs a program that kills the system and forces you to
reboot the system.
What is the use of having a computer with the ( probably )
best op.sys. except from UNIX , when there are so many
shitheads out there that does their best to kill it .
Why do you hate multitasking?
Enough of this, here comes the actual manual.
Ronnie J, programgjörare.
( OOPS, some of the stuff below are quite old, and are not
correct any longer, I hope you'll forgive me for that. )
( as you may notice, I HATE writing docs, so therefore this doc
file isn't a very pretty sight, but at least it is a doc file. )
Over and out.
Frac.Doc
Documentation to the fractal-generator FRAC
by Ronnie Johansson.
( This program is Public-Domain.
You may copy it and spread it as much as you like
as long as this textfile is not altered.
( Except for typos, which I would appreciate if you
corrected when detected. )
I hope you will enjoy the program. ) )
( PD-means you can do whatever you like with it,
if you like it : GREAT, have fun ,
if you don't : Tough luck Buster. )
Ronnie Johansson Linköping, Sweden, 900421.
Introduction.
This program was made in late december 89 ,
My christmas vacation, for the sole purpose of impressing
one of my friends, and to persuade him to study math at
the Linköping University. ( As I do )
His name is Magnus Johansson in Intagan,Trollhättan and it is
all his "fault" that this program exists.
( I hope he will become a mathematician too )
My name is Ronnie Johansson, and I am studying math at
the Linëping University, second year.
I hope that I have corrected all the bugs in the program,
( I do not know of any bug now ).
The program can generate many different fractals.
Note that all are generated by iterated complex formulas.
I am not very good at writing english, so when you find any
typos, PLEASE, do correct them.
If you wish to contact me, you can reach me at
Ronnie Johansson
Hasselkulleg. 70
461 62 Trollèttan
Sweden
Please do contact me if you detect a bug, or if you have any ideas
of how to improve the program.
Maybe you know of any other fractals you wish to be included in
the program.
Also if you think the program is great and I am a great guy,
please, drop me a letter and let me know.
( It always feels good to get praised )
I will also try to answer letters to explain how these formulas work.
1. Short about the program.
The program generates a number of fractals based on iterated
complex formulas.
Among these formulas I have included the very common used
"Mandelbrot" and "Julia" formulas, this is only an attempt to
cover all fractals based on iterated complex formulas.
Although these are the most commonly used fractals,
I prefer the transcendental functions s.a. Sine and Cosine.
I think lCOS(z) is the most fascinating fractal of this kind yet.
( Therefore this is the default choice when choosing fractal )
The program is not very fast because it is written completely
in C, so if you know assembly language and know how to interface
assembly routines with a C program, please contact me and
I'll send you the source to the calculation formulas.
Important. Mathtrans.library MUST be on the disk you boot from,
otherwise the program will crash.
2. If you are going to contact me.
I will try to answer the mail as quick as possible, but I also
have a lot of studies to do, but I hope to be able to answer
any letters within a week ( or two ).
3. How to use the program.
I hope you will find it very easy to use this program.
Here I will explain what the different menus and menuitems do.
The First Menu:
PROJECT : This is what you want the program to do,
all other menus are only to describe how and what
to draw.
ABOUT : Opens a window to display my name.
TITLE : Toggles the titelbar on/off.
START : Starts drawing with the present options chosen
on the other menus.
COLOR : Opens a window to manipulate the palette,
( I am quite proud of this one ).
SAVE : Saves the screen as an IFF-file,
100% compatible with programs like Deluxe Paint and others.
QUIT : This one needs no explanation.
FRACTAL : Choose which fractal to generate.
MAND : The ever so popular Mandelbrot.
JULIA : Generates a Julia picture.
Ma&Ju.EXT : Mandelbrot&Julia.Extended, You're gonna love this one.
See later in this file for more info.
LCOSZ : lambda Cosine Z. I like this one.
ESINZ : ( 1 - epsilon i ) Sine Z.
LEXPZ : lambda Exponent Z.
BIOMORPH : Generates a Biomorph.
TYPE : Which type of biomorph to generate.
I.e. Which formula to use.
Z3+C : Z cube plus constant.
Z5+C : Z to power 5 plus constant.
ZZ+Z5+C : Z to power Z plus Z to power 5 plus constant.
ZZ+Z6+C : Z to power Z plus Z to power 6 plus constant.
SINZ+Z2+C : Sine Z plus Z square plus constant.
SINZ+EZ+C : Sine Z plus Exponent Z plus constant.
NEWTON : Using Newton-Raphsons method oh finding roots
to a function.
TYPE : Which function to use.
Z3-1 : Find the roots to the third degree function
Z to power 3 minus 1,
I.e. Solve Z3-1=0.
Z4-1 : Z power 4 minus 1.
Z5-1 : Z power 5 minus 1.
Z5+Z3-1 : Z power 5 plus Z power 3 minus 1.
( This one is quite good )
MAGNETISM : Model for magnetism,
The Renormalization transformation in terms of the
"temperature" variable x=exp(J/kbT).
SCREEN : What screen resolution to use.
Important. When changing the screen,
all palette information will be lost.
LORES : Make screen low resolution.
HIRES : Make screen high resolution.
NOLACE :
Need these explanations?
LACE :
SURFACE : What type of surface to generate fractal upon.
D2RECT : This is what you are used to.
D3RECT : Tries to make it 3-D.
SPHERE : Generates onto a sphere.
That's all, folks.
4. The second menubar.
When drawing a picture, the ordinary menubar will be replaced by
a second one.
This menubar has only one menu : DRAWING...
with the three items TITLE, COLORS, STOP.
TITLE and COLORS are the same as usual,
and STOP only stops the drawing ( logical ehe? )
and returns to the ordinary menubar.
Important. When you choose STOP the drawing will of course be
stopped, but it cannot be started again at the place of stopping.
START always starts with a blank screen.
( Did that make sense )
5. The Value Window.
When choosing START a window will first be opened to get numerical
information about the picture,
when this information is given, and the window is closed
( selecting OK ) the drawing will start.
This window contains a number of string gadgets, where numbers
describing the picture will be displayed, and altered if
so is wished.
The number of gadgets/values is depending on which options are
chosen in the menus.
These gadgets are always there:
ReMin, ReMax: The interval of the real value of the
complex area displayed,
from left to right of screen.
ImMin, ImMax: The interval of the imaginary value of the
complex area displayed,
from bottom to top of screen.
( If you are not familiar of complex numbers,
treat these values just as coordinates on a plane )
MaxIter : Maximum numbers of iterations to do on each
pixel.
A high value would give the picture a high consistent
with reality, but would slow down the computer.
There are a lot of other gadgets that will be displayed, but
these are specific to the options chosen, and will be described
under the fractal that needs them, or the Surface algorithm that uses
them.
6. The Different types of fractals.
MANDEL :
Mandelbrot function.
The values of the series Z is calculated :
2 n
Z = Z + C.
n+1 n
Where Z = 0, and C is a complex constant representing the
0
point that is to be investigated.
One calculates the speed of divergence,
i.e. how many iterations the formula needs for a specific point
to escape to infinity.
One has proved that if the absolute value of any Z in the serial
is greater than 4, then the serial will diverge towards
infinity, this is also true for the Julia function.
When one has detected divergency, the iteration is canceled
and the point is colored according to the speed of divergency it had,
i.e. the number of iterations needed to detect divergency.
If MaxIter number of iterations are made but no divergency is
detected the point will be colored black.
This does NOT mean that the serial converges, it does only tell us
that the serial does probably not diverge towards infinity.
The serial can just as well diverge towards a cycle of points with
absolute values less than 2.
This is far the most known and popular fractal.
JULIA :
Julia is closely related to the mandelbrot function.
( Same function but different start criteria )
Here we choose Z the same way as we chose c in the mandelbrot
0
function, and uses the same constant for all the points that
we investigates.
This Constant is entered in the "Value Window" as ReConst and
ImConst.
One thing that shows the very close relation between Mandelbrot
and Julia is that if the constant for Julia is chosen as a point
that comes from within the black area of the mandelbrot Set,
( the black points that does not diverge towards infinity )
the julia set generated by this constant will also have a large
black area.
If the constant is chosen from outside of the Mandelbrot Set,
the Julia Set will not contain any black areas, but only an
infinitely number of nonconnected points distributed
over the complex plane.
Try to take points from the "edge" of the mandelbrot set,
these constants often makes the best julia sets.
Ma&Ju.EXT :
Mandelbrot&Julia Extended. You're gonna love this one!
Have you not wanted to do fractals that no man has done before you?
And yourself choose which algorithms to use.
First you will have to give the program TWO constants,
C1 and C2,
Then the program asks for a string called RULES:
Here you can type a string of the rules you want the algorithm to
use.
These can be any combination of A, B, C, D and E.
Important. Only major characters allowed.
Which are then these rules:
A : Zn+1 = Zn + Z0
B : Zn+1 = Zn + C1
C : Zn+1 = Zn + C2
D : Zn+1 = Zn2
E : Zn+1 = Zn2 + Zn/4
These rules are combined to tell the program how to iterate the
function.
E.g. If the rules are DA,
Then the first iterate is to square Z, and the second iterate would
be to add the local constant Z0, ( the point that is investigated ),
to Z.
When both these operations have been done, then the iteration counter
will be incremented and the rules will be repeated on and on ...
I.e DA is equivalent to the serial DADADADADADA......
which is the same as generating a mandelbrot figure.
In the same way DB or DC would generate Julia pictures, with the
constant in C1 or C2.
Note. MaxIter is not the maximum number of operations to do ,
but the maximum number of times to run through the string of rules.
LCOSZ :
lambda COS (Z) .
This is my favorite.
Lambda should be in the interval ( -3.14, -2.92 )
When lambda is greater than 2.96 there will be a large black deformed
circle centered around ... -PI 0 PI 2PI 3 PI ... on the real axis.
But when lambda falls below 2.96 the fractal explodes and no black
regions will survive the explosion.
Test to draw a couple of pictures for lambda between -3.14 and -2.92
and you will see what I mean.
ESINZ :
(1-epsilon i ) SIN (Z).
Quite fascinating and very beautiful.
Let epsilon be in the interval 0.1 to 0.4.
Draw it, You'll like it.
LEXPZ :
Lambda Exponent Z.
I have made only very few pictures with this formula, so I do not
have much to write about it.
BIOMORPH :
The same principle as Julia pictures, but different formulas and a
slightly different way to choose if to paint pixel.
6 different types of formulas.
These are very suitable to draw with D3-RECT.
NEWTON :
The Newton-Raphson method of finding roots to a function.
Of course I have included the very popular Z3-1=0 equation,
but try Z5+Z3-1=0, that's really something.
MAGNETISM :
Model of magnetism.
The Renormalization transform in terms of the "temperature" variable
x=exp(J/kbT).
This one I found in " The Beauty of Fractals" p 129 and forw.
Try Re = [ -6, 6 ]
Im = [ -6, 6 ]
C = ( 4, 0 )
7. REFERENCES.
You don't have to bother with these books if you just want to make
pictures, I hope the program is easy enough to use without
having to read a lot of books.
The Beauty Of Fractals, H.O.Peitgen P.H.Richter,
Springer Verlag 1986.
A very fine book with many very beautiful pictures,
but the text is often very advanced, this is nothing
that you can read and understand without at least 1.5 -2
years of math studies at university level.
But the pictures are GREAT.
The Science of Fractal Images, H.O.Peitgen ( don't remember the other guy )
Springer Verlag 198?.
This book is almost the same as the previous, but now they have
skipped almost all the mathematical formulas and theory and
replaced it with pseudocode to generate the pictures.
There are a few more fractals in this book.
If you want code and an easy to understand book, buy this one.
If you want theory and mathematical proofs, buy the other one.
The Fractal Geometry of Nature, B.B.Mandelbrot,
International Business Machines
Thomas J. Watson Research Center
W.H.Freeman and Company, New York 1977.
This book is written by the master himself.
Very advanced.
BIOMORPHS: Computer Display of Biological Forms Generated by
Mathematical Feedback Loops.
C.A.Pickover,
Computer Graphics Forum vol 5 1986
( can be found at almost any university library )
This was all for this time.
ADDITIONS:
Models for Magnetism
In "BoF" there are two different models used for magnetism.
Each of these have two different mappings, x- and q-mapping.
The X-mapping ( variabel mapping ) is what corresponds to the all famous
Julia function.
( i.e. The Julia function is the variabel mapping of the square function
x=x^2+c )
The Q-mapping ( parameter mapping ) is what corresponds to the
Mandelbrot function.
( i.e. The Mandelbrot function is the parameter mapping of the square
function. )
So, Magnet q1 would then be the parameter mapping of model 1.
And, in the same way, Magnet x2 would then be the var. mapping of model 2.
( quoting the Bof )
Two hierachical lattices with Potts spins are analyzed. The renormalization
transform in terms of the "temperature" variable x=exp(J/kbT) reads
( 2 ) 2
| x +q-1 |
x |-> | ------ | ( MODEL 1 )
( 2x+q-2 )
( 3 ) 2
| x +3(q-1)x+(q-1)(q-2) |
x |-> | ----------------------| ( MODEL 2 )
| 2 2 |
( 3x +3(q-2)x+q -3q+3 )
where q is the number of Potts states in the original model but is treated
as a complex parameter here.
End of Magnet addition.
STRANGE ATTRACTOR.
A strange attractor is a very,very,very complex mathematical object.
To make it short:
An iterated formulas can behave in some different ways.
First, Fixpoint iteration, the iteration is attracted by a fix point,
that might be zero 3.65 or, why not, infinity.
That is when you give that specific number as input to the iteration,
you'll get the same number as output.
Second, Periodic Cycle. the iteration is attracted by a periodic
cycle.
And the third one, Strange Attractors.
The iteration is attracted by something, but we do not know exactly
what it is.
One of it's features is global convergens, but local divergence.
( Did that make sense ? )
Lorentz attractor is a well known example.
Search your local library for books about attractors if you want to
know more about it.
I don't have any particular book to recomend.
STRANGE ATTRACTOR in this program is based on an article by
Clifford A Pickover.
Computer & Graphics vol 12 no 2 pp 263-267,1988
A note on rendering 3-d strange attractors
Clifford A Pickover.
The iteration is in R3 eucledian space.
X | ( sin(a*y) - z*cos(b*s) )
Y | => | z*sin(c*x) - cos(d*y) |
Z | ( e*sin(x) )
n+1
T
It starts in (0,0,0) and has five parameters a,b,c,d and e.
It will automatically adjust the width and height parameters so that
the attractor never will come outside the border of the screen.
Just press ok. and wait and watch.
It takes from 30 min to 1 h to generate the picture.
First it will only look like some randomly distributed points on to the screen,
but after a while it will take a more solid form.
OBS No maxiter is asked for.
When you think the picture is finished, press stop.
( But let it at least run for 30 min . )
End of Strange Attractor.
CYCLIC SYSTEMS:
Computers & Graphics vol 11 no 2 pp 217-226, 1987
Mathematics and Beauty:
Time-Discrete Phase Planes Associated With the Cyclic System,
Clifford A Pickover.
Look in the article for further details. ( I hate writing docs and tries to
make it as short as possible. )
The six different systems are
0 : f = Sin( x + Sin( px ) )
2
1 : f = Sin( x + Sin( px ) )
2 : f = Sin( x + Tan( px ) )
3 : f = Sin( x + Sin( x )Sin( px ) )
4 : f = Sin( x + Cos( px ) )
( Sin( x ) : |x| < PI
|
| 2
5 : f = | Sin( x + Sin( px ) ) : PI =< |x| =< 2PI
|
| 2
( Sin( x + Sin ( px ) ) : |x| > 2PI
Short:
We look at a system of two differential equations :
x'(t) = -f(y(t)) and
y'(t) = f(x(t)) .
We calculate approximations of the d.e using the forward Euler
approximation.
If you have studied some Numerical Analysis, you'll know what it is.
Enough of this, try them out and you'll know how they work.
OOPS, in getvalue window res how many increments that will be use on each
axix.
res = 50, split the x-axis in 50 parts,and the y-axis in 50 parts.
that makes 2500 parts ( 50*50 ).
Each of these points will be used as a starting point for the approximation
and the iter succeding points of each starting point will be plotted.
h is what walue of h that will be used.
END CYCLIC SYSTEM
ULTIMATE
The general purpose fractal generator.
This is version 2.1 of the program, and is probably the last version
ever, atleast that I write.
( I'm quite feed up with this program now. )
I have removed Mandelbrot & Julia Extended and replaced it with
this one instead.
With this option you can generate almost any possible fractal.
How to use it.
First one must type the Iteration Formula,
This is done by writing an appropriate text string in the text gadget.
110 characters are the maximum lenght of this string.
The default formula is the one that generates the mandelbrot set.
This formula describes how to calculate
Z = f ( Z ) .
n+1 n
I.e. it describes the complex-valued function f .
The formula uses an "register" to calculate the iteration,
and most of the operations work directly on this register.
At the start of the iteration, the register will automatically be
set to 0.
(The Mandelbrot default )
KFAq
At the start of the iteration the register will be set to 0.
K : +Zn , add the previous value of Z to the register.
F : ^2 , square the register.
A : +Z0 , add start value of iteration to register.
q : Z > , check if the norm of Z escapes towards infinity.
If the Norm ( distance to origo ) of the number Zn
is greater than the value of Z > , this will break
the iteration.
As , I hope , all of you already have seen, this is simply the formula
to generate the mandelbrot set.
To help writing the formulas, I have included many different operations,
ten different constants, ten memory variables and four different ways
of checking if to abort the iteration.
The first five operates Z0 on the register.
Z0 is the starting value of the iteration.
A , +Z0 : Add contents of Z0 to register.
B , -Z0 : Subtract contents of Z0 to register.
C , *Z0 : Multiply register with Z0.
D , /Z0 : Divide register with Z0.
E , ^Z0 : Power Z0 of register.
The next five takes some standard powers of the register.
F , ^2 : Square register.
G , ^3 : Cube register.
H , ^4 : Take power 4 of register.
I , ^5 : Take power 5 of register.
J , ^6 : Take power 6 of register.
The next five operates Zn on the register.
Zn is the previous value of the serie Z,
Is used when calculating Zn+1.
NOTE if you don't use at least one of the following in your iteration formula
I bet that the result will not be extremely interesting.
K , +Zn : Add Zn to the register.
L , -Zn : Subtract Zn from the register.
M , *Zn : Multiply Zn to the register.
N , /Zn : Divides register with Zn.
O , ^Zn : Takes power Zn of register.
The next five is some useful trancendental functions.
P , ln : Takes logaritm function of register. ( Base e )
Q , exp : Exponential function of the register.
R , sin : Sine function of the register.
S , cos : Cosine function of the register.
T , tan : Tanget function of the register.
The next five operations, operate the constants on the register.
These are Two-Character-Operations, which means that one also must
tell wich constant to use.
x is an integer 0,1, ... ,9 telling the computer wich constant to use.
Ex. a3 means add constant 3 to register.
ax , +Cx : Adds constant x to register.
bx , -Cx : Subtracts constant x from register.
cx , *Cx : Multiplies constant x to register.
dx , /Cx : Divides register with constant x.
ex , ^Cx : Takes the register to power constant x.
The next four are to tell the computer how to check if to abort the
iteration.
The pixels are colored according to the number of iterations it takes
to discover divergens.
If maxiter number of iterations were made without discovering divergens,
the pixel will not be colored at all.
If you do not use at least one of the following in your formula,
the program will NEVER detect divergens and will therefore not
color any pixel at all.
The value of Z is assumed to be in the register.
The abortion of the iteration is not made until the end of the formula,
so it is possible to combine two or more of the operations.
Ex. hi will make both the checks before aborting the iteration,
even if the h check tells the program to abort.
ghi gives almost the same result as the biomorphs do.
j is useful when checking convergens, as in the newton-raphson method.
I suggest that these checkings are made at the end of the formula.
g , Z > : If the Norm of Z is greater than the limit value of Z >,
then the iteration will be aborted, and the pixel will
be colored according to how many iterations it took to
reach this limit.
( Standard divergens check )
h , Re> : If the real part of Z is it greater than the limit value of Re>
then the iteration will be aborted, and the pixel colored.
The color will also be slightly different than in the g check.
i , Im> : The same as h, but works with the imaginary part of Z instead.
The color will be slightly different than in the g ani h case.
j , dZ< : Checks if the difference between Z and Zn is less tan the
limit value of dZ<,and if so the iteration will be aborted.
The next 8 operations work with the ten different memory variables.
In these variables it is possible to store temporary results in the formula.
As the operations of the constants, these are also
Two-Character-Operations.
kx , +Tx : Adds temporary variable x to register.
lx , -Tx : Subtracts temporary variable x from register.
mx , *Tx : Multiplies temporary variable x to register.
nx , /Tx : Divides register with temporary variable x.
ox , ^Tx : Takes register to power of temporary variable x.
px , ->Tx : Copies register to temporary variable x.
qx , <-Tx : Copies temporary variable x to register.
rx , <>Tx : Swaps temporary variable x and register.
The last two operations:
s , = 0 : Sets register to 0,
Useful after using px.
t , INV : Inverts the register.
Real and Imaginary max and min is the same as before.
There are ten different constants 0-9 to use.
There are four different escape limits.
Z > , Re> , Im> , these work with operations g h i respectively,
and checks if the norm of Z is greater than these limit values.
dZ< , this one works with operation j , and checks if the difference
between two succeding values of Z is less than the limit.
HINTS,
The operations does not include all functions but most others can be obtained
by using combinations of the others.
This is how they are related:
( z=a+bi is a complex number, a and b are real )
Exp(z) = Exp(a)*( Cos(b) + Sin(b)i )
Ln(z) is the inverse function of Exp.
( it is quite tricky to calculate ln of a complex number, so it is more
time consuming than the other functions. )
zi -zi
e - e
Sin(z) = ------------ = sin(a)*cosh(b) + i*cos(a)*sinh(b)
2i
zi -zi
e + e
Cos(z) = ------------ = cos(a)*cosh(b) - i*sin(a)*sinh(b)
2
Tan(z) = Sin(z) / Cos(z) .
( These were included )
ArcSin(z) = -i*ln( z*i +/- Sqrt( 1-z*z ) ) .
ArcCos(z) = -i*ln( z +/- i*Sqrt( 1-z*z ) ) .
ArcTan(z) = i/2*ln( (i+z)/(i-z) )
( As you see, these functions are multivalued, so use the one you choose. )
Sinhyp(z) = -i*Sin( -z*i ) ( = (Exp(z)+Exp(-z))/2 )
Coshyp(z) = Cos( -z*i )
Tanhyp(z) = Sinhyp(z)/Coshyp(z)
ArcSinhyp(z) = ln( z +/- Sqrt( z*z+1 ) )
ArcCoshyp(z) = ln( z +/- Sqrt( z*z-1 ) )
ArcTanhyp(z) = 1/2*ln( (1+z)/(1-z) )
Also notice that the complex powerfunction is NOT continous around the
negative part of the real-axis.
Therefore it is not very surprising if the picture looks odd, around
the real-axis when using operations E or O.
I.e. The self powered function Z^Z will not look like the ones in the
biomorph section.
When using biomorphs I did not use the true Z^Z function, but
Z^(a+|b|i) instead, when this would give a continous function.
KFAq is mandelbrot function.
KFa0q is Julia function with constant number 0 .
KFm0jf0iKGm1k2c0t with ( 3 , 0 ) as constant 0 ,
( 2 , 0 ) as constant 1 ,
( 1 , 0 ) as constant 2 ,
would generate the Newton-Raphson mapping for the function
Z3-1 = 0.
Have Fun.
End of Ultimate.