home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
093.lha
/
Chaos
/
chaos.doc
< prev
next >
Wrap
Text File
|
1986-11-20
|
5KB
|
145 lines
CHAOS - a program to explore the Hennon mapping
===============================================
*** WARNING *** *** WARNING *** *** WARNING ***
- If you run this program from CLI, make sure the stack is set
to at least 10,000. Otherwise you will meet the GURU.
- This program uses the Math library on your WB disk, so
don't be surprised if you are asked for the WB disk when
the program starts running.
*** WARNING *** *** WARNING *** *** WARNING ***
To see what kind of pictures you can get with this program
just start it up and choose START from the ACTIONs menu.
Then just wait for a while and see the picture develop.
To see other possibilities choose one of the things in the
PRE-SETS menu. Hi-res (640 X 400) gives prettiest pictures.
About the program:
-----------------
This program allows you to explore the Hennon mapping. The Hennon
mapping is a function that maps points on the plane to other points on
the plane. Normally you start with one point and apply the function to
it to obtain another point. Then the function is applied to the
second point, to get the third, etc. All the points along the way are
plotted. The set of all points plotted this was is called an "orbit".
Picking a different starting point gives another orbit, and a whole
bunch of orbits makes an image.
The formula I used is this:
x = x * cos (a) - (y - x * x) * sin (a)
y = x * sin (a) + (y - x * x) * cos (a)
The coefficient 'a' determines the shape of the picture. Since SIN
and COS are periodic functions values of 'a' that give distinct
pictures lie between 0 and 2 * PI (or between 0 and about 7).
CONTROL PANEL
-------------
The control PANEL (can be chosen from the ACTION menu) allows
you to modify various parameters to see different pictures.
Here is a brief description of these parameters:
"A" coeff - this is the coefficient 'a' in the above equation;
determines the shape of the picture.
"X inc"
"Y inc" - the starting point for the first orbit of every
picture is (0.01,0.01); each following orbit
will start with a point (0.01 + x_inc, 0.01 + y_inc);
these parameters dermine how closely the orbits are
to each other; by the way, the X and Y increments
need not be the same; when you change these use
small amounts (doubling, or halving the number
often gives good results).
Iter/Orbit - number of iterations per orbit; for faster computation
pick a smaller number, for more details pick a larger
number.
Orbits - how many orbits to draw; can be set to a large
number; you can always stop the computation;
more orbits means more interesting picture.
Colors - each orbit is drawn in a different color; this
number specifes the maximum number of colors to
use; the highest value is 15.
Zoom Factor - this number can be used to magnify or shrink the
entire picture; if you change the Zoom Factor you
will have to re-compute the picture; setting this
number to 2.0 makes the picture twice as large;
note that Zoom Factor need not be an integer
(i.e. value 1.5 is OK).
Other Menu items
----------------
ACTION menu
START - start computation
PANEL - see above section
ABOUT - information about the program
SAVE IFF - save current picture to an IFF file
QUIT - exit the program
SCREEN menu
CLEAR SCREEN - obvious
TOGGLE TITLE - show or hide screen title
PRE-SETS
pre-set parameters for some nice pictures
Some other tid-bits
-------------------
The reason this program is called CHAOS is that it demonstrates how
a very orderly mapping becomes chaotic when it gets to certain point.
If you look at the picture you will see what I mean.
To find out more about Hennon mapping, chaos, computers and math see
the July 1987 Computer Recreations column in "Scientific American".
The CHAOS program works in any resolution. I found that the
most intricate pictures are produced in hi-res mode.
Some legal stuff
---------------
****************************************************************
This program is PUBLIC DOMAIN, that means, you can distribute
it free of charge as long as this notice is included.
Copyright 1987 (c) by Richie Bielak
****************************************************************
This program was written using the Benchmark Modula-2
system - the best development on the Amiga yet (in my
opinion).
If you have any comments, questions, suggestions or you've
found parameters that make pretty pictures drop me a line.
You can get me:
CIS: 75716,352
PLINK: RICHIEB
Gateway BBS (718)-338-3501
SNAIL MAIL:
526 79th Street
Brooklyn, N.Y. 11209
Enjoy....Richie
****EOF***EOF****EOF***