home *** CD-ROM | disk | FTP | other *** search
- CHAOS version 2.1A
-
- (C) Copyright 1989 Judson McCranie. All rights reserved.
-
- Judson S. McCranie
- Software Solutions
- 2406 Orlando Drive
- Valdosta, GA 31602
- Ph: (912) 242-1405
-
- This program is produced by a member of the Association of
- Shareware Professionals (ASP). ASP wants to make sure that the
- shareware principle works for you. If you are unable to resolve
- a shareware-related problem with an ASP member by contacting the
- member directly, ASP may be able to help. The ASP Ombudsman can
- help you resolve a dispute or problem with an ASP member, but
- does not provide technical support for members' products. Please
- write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006
- or send a Compuserve message via easyplex to ASP Ombudsman
- 70007,3536.
-
- This program is distributed on a "Shareware" (try-before-you-buy)
- basis. You are free to copy it and to distribute copies at cost.
- You may not alter the program (or its documentation) or sell it
- for profit. If you like these programs, register them by sending
- your name and address along with the program name and version
- number above with a $10 registration and license fee (for the
- entire package of Chaos programs) to me at the address above.
- You will receive support for the program, announcements of new
- versions of this program, and information about several other
- programs. Please send any inquires, comments, or suggestions to
- me at the address above. Even if you are not a registered user,
- I would appreciate any comments or suggestions.
-
- These programs should run on any IBM-PC/XT/AT/PS-2, or compatible
- system that has any common graphics adapter. A fast CPU is
- recommended. (Significantly faster 80x87 versions may be
- forthcoming.)
-
- Welcome to the world of Chaos! The following programs are
- included in this package:
-
- BUTERFLY - Investigate the Lorentz "Butterfly"
- TRIANGLE - Generate a surprising pattern randomly
- LOGISTIC - Graphs the logistic equation
- 3-BODY - A simplified orbit of a planet around two stars
- HENON - Draws Henon diagrams
-
- These programs were developed using Turbo Pascal 3.0, 4.0, 5.0,
- and 5.5 from Borland International. The Turbo Professional 5.0
- package from Turbo Power Software provided useful data entry
- routines.
-
- The files *.BGI are graphics drivers for virtually all graphics
- adapters. They are proprietary to Borland International and are
- distributed with permission.
-
-
- C H A O S
-
- The PBS show "Nova" broadcast Jan 31, 1989 was about the new
- science of Chaos. For reading about Chaos, I recommend:
-
- Chaos - making a new science" by James Gleick, Viking, 1987
-
- Does God Play Dice? - The Mathematics of Chaos"
- by Ian Stewart, Basil Blackwell, 1989
-
- "Chaos" by James Crutchfield, et al, Sci. Amer. 12/89, 38-49
-
- "Metamagical Themas", Sci. Amer. 11/81, 16-29.
-
- "Computer Recreations", Sci. Amer., 7/87.
-
-
- B U T E R F L Y
-
- Edward N. Lorenz published "Deterministic Nonperiodic Flow" in
- the Journal of Atmospheric Sciences in March 1963 (130-141). That
- paper modeled atmospheric convection by a system of nonlinear
- differential equations in a 3-dimensional phase space. He showed
- that the equations have two stable solutions, and that when the
- value of a constant (R) is below a critical value, the convection
- will eventually get into one of those two stable states. When R
- is larger than the critical value, the system "orbits" the two
- stable points or attractors (in phase space) chaotically and
- never settles down into a stable state.
-
- BUTERFLY is a program to investigate the Lorenz "Butterfly" in
- several ways. You begin by entering a value of R not greater
- than 40. The program defaults to 35.0. Then you have a choice
- of nine ways to look at the butterfly.
-
- Views "1", "2", and "3" graph two of the the dimensions of the
- object. View 1 graphs Y and Z, view 2 graphs X and Z, and view 3
- graphs X and Y. The graph is color coded according to the
- dimension not graphed in each view. Press "C" to toggle the
- color option.
-
- Views "x", "y", and "z" graph that dimension in time. When the
- graph gets to the right-hand side of the screen it will start
- over at the left, except that the X, Y, and Z values starting at
- the left side will be 1/10 of 1 percent (0.001) different. The
- two graphs (in different colors) will overlap for a while, then
- they will separate - often radically. When the second graph gets
- to the right-hand side of the screen it will pause until you
- press a key. The "P" key will toggle this "pause" option.
-
- Views "X", "Y", and "Z" graph each relative max or relative min
- in that dimension versus the previous one. The relative max and
- relative min values are graphed in different colors. This takes
- dome time to generate, since it takes a whole loop of the
- butterfly to generate two points.
-
- While the program is running, you can also press "T" or "t". The
- "t" key doubles the time increment. This makes the program run
- faster, but the points are farther apart, and less accurate. The
- "T" key halves the time increment.
-
- Press the <ESC> key and any other key to stop the program. If
- you use <CTRL-BREAK>, the program will leave your screen in
- graphics mode, which is undesirable.
-
-
- T R I A N G L E
-
- This program performs a process that generates a pattern randomly
- as seen on "Nova - The science of Chaos", Jan. 31, 1989.
-
- The process is as follows : choose points A, B, and C (not on a
- line). Now choose an initial point (the "current point")
- anywhere. Repeat the following process: randomly choose either
- A, B, or C. Call the midpoint of that point and the current
- point the new current point and plot it. Repeat the process with
- the new current point.
-
- When the process is repeated many times, a surprising pattern
- emerges. The program TRIANGLE performs this process and plots
- the points so you can see the pattern.
-
- The program asks you for the number of milliseconds to delay
- between each point, the default is 0. A delay of 0 plots the
- points as rapidly as possible. A delay of, say, 10 to 100 lets
- you see each point being plotted.
-
- You will get a different set of points each time the program is
- run, but the pattern will be the same.
-
- Some people have asked me for an explanation of how you get such
- a pattern from randomness. This is a brief informal explanation
- that could be made rigorous.
-
- The current point must eventually fall inside triangle ABC. If
- the current point is outside triangle ABC, successive points are
- nearer to the triangle. Once the current point is sufficiently
- near ABC, as soon as each of A, B, and C have been chosen the new
- current point must be inside ABC.
-
- Now suppose the current point is anywhere inside ABC. If point A
- is now chosen, the next current point (the midpoint of the
- current point and A) must be inside AEF. Similarly, if B was
- chosen, the next current point must be in BDE, or if C is chosen
- it must be in CDF. So once the current point is inside ABC, the
- next current point cannot be inside DEF.
-
- A
- /\
- / \
- / \
- E /------------\ F
- / \ / \
- / \ / \
- / \ / \
- /-------------\/-------------\
- B D C
-
- Now, without loss of generality, assume that the current point is
- somewhere in AEF. If point A is chosen, the midpoint (and next
- current point) must be in AGH. If point B is chosen, the next
- current point must be in EIJ. If point C is chosen, the next
- current point must be in FKL.
-
- A
- /\
- G /----\ H
- / \ / \
- E /-----\/-----\ F
- / \ M / \
- I /-----\ J K/-----\L
- / \ / \ / \ / \
- /-----\/------\/------\/-----\
- B N D O C
-
- The cases where the current point was in BDE or CDF are
- symmetrical, and cause the next current point to be inside BIN,
- EGM, DKO, or CLO, FHM, or DJN, respectively. So now the current
- point can't be in DEF, GHM, IJN, or KLO.
-
- This process is repeated recursively (an infinite number of
- times) on each of the triangles that the current point can be in
- and it generates the pattern of allowed points.
-
- Question : How much allowed area is left after the recursive
- process is repeated an infinite number of times?
-
- This shape is also known as the Sierpinski gasket. It has
- fractal (Hausdorff) dimension of log 3 / log 2 = 1.584 ... It is
- also isomorphic to the pattern that results when you plot only
- the even (or odd) values in Pascal's triangle. There is also a
- one-dimensional cellular automata that generates this pattern
- when each generation is graphed successively.
-
-
- L O G I S T I C
-
- Populations are sometimes modeled by the logistic equation
- Xnew = RX(1-X),
- where X is the current population, Xnew is the next year's
- population, and R is a constant between 0 and 4. X is between 0
- (population dies out) and 1 (max possible population). Here R is
- varied from 2.75 to 4 across the screen. The population for each
- R is plotted vertically. When R is between 1 and 3, the
- population quickly converges to some stable value. When R is a
- little larger than 3, it settles into an oscillation between two
- population sizes. When R increases more the population begins
- oscillating among 4 values. As R increases some more, the
- population begins to oscillate among 8 values. If R increases a
- little more, Chaos breaks out - the population varies
- chaotically. The logistic equation is also used in a laser
- optics problem see "Quantum Optics" in "The New Physics", edited
- by Paul Davies.
-
- As an example, when R=2.7, X soon converges to 0.6292. When
- R=3.5, and x is initially 0.4, say, the successive values of X
- are:
-
- 0.4000 0.8400 0.4704 0.8719 -->
- 0.3908 0.8332 0.4862 0.8743 -->
- 0.3846 0.8284 0.4976 0.8750 -->
- ... converging to and oscillating among:
- 0.3828 0.8269 0.5009 0.8750 -->
- 0.3828 0.8269 0.5009 0.8750
-
- These values are plotted vertically as R varies horizontally.
- The first few points calculated may stray from the final pattern.
- For that reason, the program allows you to ignore the first few
- points. By default, it ignores the first 100 points and plots
- the next 100 points for each value of R. The program asks you
- for the number of initial points to ignore default is 100) and
- the number of points to plot for each R default is 100). You can
- enter max and min R values so you can enlarge interesting areas.
- The program allows you to vary the limits on R. The graph has
- self-similar elements - parts of it are similar to the whole.
- You can vary the limits on R to enlarge certain ranges to see
- features in more detail.
-
-
- 3 - B O D Y
-
- This program graphs a Hill's reduced model of the three-body
- problem. All motion is restricted to a plane. There are two
- massive stars and a planet of negligible mass orbiting under the
- influence of the two stars. In the current program the two stars
- have the same mass and they are fixed in space. This is not the
- same thing as having your coordinate system rotate so the stars
- appear fixed, however. The program puts the planet randomly on
- the screen and gives it a random push. The path of the planet is
- chaotic. Basically, one of three things happens. In order of
- likelihood, these are:
-
- (1) The planet passes close to one of the stars and is thrown out
- of the system. (The program beeps and stops if this happens,
- waiting for you to press a key.)
-
- (2) The planet orbits chaotically for a while before being thrown
- out.
-
- (3) The planet continues to orbit indefinitely in a non-periodic
- orbit that is confined.
-
- Press <ESC> to stop the program. When the program beeps it is
- waiting for you to press a key.
-
-
- H E N O N
-
- The Henon maps deal with orbits in the restricted three-body
- problem. For more details see the July 1987 Scientific American
- "Computer Recreations", "Henon Mapping with Pascal", by Gordon
- Hughes, Byte, Dec. 1986, page 161 ff, or the books by Gleick or
- Stewart.
-
- You're pretty much on your own for this one, but the parameter
- entry routines are easy to use. Just accept the default
- parameters, or make small changes in them. Try varying the first
- parameter (R) - especially between 1.0 and 1.5. The graphs are
- quite interesting.
-
-
- O T H E R P R O G R A M S
-
- Other programs by this author:
-
- Shareware programs:
-
- Checkers - Plays the game of Checkers
- Connect4 - Plays the game of Connect 4
- Master - Plays either side of the game of Mastermind
- Fox - Plays the game of Fox and Geese
- HyperQub - Rotates a 4-dimensional hypercube
- Demon - Graph crystal-like growth patterns (cellular automata)
- Chaos - Graphs several types of "Chaos":
- Lorenz Butterfly
- Logistic Equation
- Henon maps
- Three-body problem
- Triangle pattern
-
-
- Educationally oriented programs:
-
- Factor - Quickly finds the prime factors of an integer < 2^32
- MagicSq - Generates magic squares up to 175 x 175
-
-
- Forthcoming:
-
- SlideSho - Make text slide show in various fonts, sizes, & colors
- Life - Conway's "Game of Life" - a computer simulation
- Orbits - Graphs 2- and 3-body orbits
- Reversi - Plays the game of Reversi (a.k.a. Othello)
- Squares - Plays the game of Dots and Squares