travelling in lyapunov space - your book · the basic (core) program i call this the basic program...

10
TRAVELLING IN LYAPUNOV SPACE Front piece £ (010101 010101) + £(101010 101010)

Upload: others

Post on 07-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

TRAVELLING IN LYAPUNOV SPACE Front piece

£ (010101 010101) + £(101010 101010)

Page 2: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

TRAVELLING IN LYAPUNOV SPACE

A TREATISE AND MANUAL FOR TRAVELLING IN LYAPUNOV SPACE

GORDON A BAKER

2nd Edition Toronto SEPT 2010

Page 3: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

- GLOSSARY OF CONTENTS-

Chapter 1 – THE ADVENTURE BEGINS – background of the construction of these graphics. - the basic elemental program, the Rosetta stone of all subsequent fractals. – the strange relatedness of twin fractals. - navigating in Lyapunov space.

Chapter 2 – Colour – It is all in the way you look at it.

Chapter 3 – ADDING TWO LYAPUNOV UNITS – The Lyapunov unit as a function representing a fractal – a mathematical representation and description of these fractals - my abbreviated program as an algorithm of Dewdney's and Marcus's work.

Chapter 4 – ROGUE PROGRAMS – programs developed in error that should not work but do, types of rogue programs - an extension of the nomenclature for them.

Chapter 5 – RETURNING HOME – profound effect of changing the genetic code- related codes do not a family make – a sum that verifies the method of summing fractals of this type.

Chapter 6 – CREATION – What if our universes began with different parameters. Changing Lyapunov's basic formula can have strange effects.

Page 4: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

TRAVELLING IN LYAPUNOV SPACE

LYAPUNOV FOR COMPUTER ARTISTS

CH. 1 THE ADVENTURE BEGINS

1. THE SOURCE OF MY VERSION OF LYAPUNOV SPACE In September 1991, I read an amazing and inspiring article in Scientific American Magazine. The stunning beauty of the graphics were impressive in an artistic sense. My first thought was that I would require a very powerful computer to produce anything so beautiful. Not so.

The idea of writing this monograph occurred when I tried to solve the problem of creating the wonderful graphics by A.K Dewdney in Scientific American. He describes methods to produce the graphics but to me they seemed outlined only compactly, in a sketchy mathematical style, intended for

experts. I am not primarily a programmer but my familiarity with Basic programming language and an interest in mathematics was a great help in exploring this area.

Using the formulas and general methods in the article, but framing the work in my own way, with as much simplicity as I could evoke, I wrote this lean version. However, an Artist's eye gave me a different perspective in which to write this treatise on a fascinating family of graphics. The end result is this article. I must thank Dr Dewdney for his comprehensive presentation, and the most eminent Dr Mario Markus, the then M.I.T.instructor who devised a method of coaxing computers to draw the equations of Lyapunov, and of course, old Lyapunov himself, the obscure mathematician,

seemingly more interested in subjects other than chaos (if even the idea existed in his day). He never lived to see what magic his set of equations could spin on a screen. It is like the tragic situation of Schubert who wrote symphonies that he never had the opportunity to hear.

My approach to the subject is more from the point of view of an artist. If you expect proofs and the precision of science, there are some This is not the main thrust. I chose to guess, speculate, play, wander about, imagine and above all enjoy the subject as an artist. This will probably irk more left brained and rigourous readers. I also tried to give the work a mathematical organization. If you are a programmer, you can try to improve on the programs in your language of choice. The programs are done in RealBasic™ . They were originally, in Microsoft QuickBasic™ now unavailable to me.

Page 5: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-2- TRAVELLING IN LYAPUNOV SPACE

Maybe other languages are better. I miss particularly not being able to write the floating numbers whose precision can be quantified.At any rate these programs are done in the self taught Basic with which I am comfortable, ; it can perhaps be written to be faster and more elegantly in a C language. I am unsure of this. There is no better language than Basic for explaining, to others, what I am doing.One main purposes in writing this, is to describe my fractals in mathematic forms, to better organize them, and to understand the extent to which they can be manipulated. The equations seem more flexible than one imagines.

THE ROSETTA STONE: The basic formula This book is written for the artist with some computer literacy, or a student who wants to explore a fascinating new world. Imagine a trip on a planetary lander, that can manoeuvre it over the surface of a newly discovered planet at different altitudes..

Well, most of us will never be able to be astronauts, but can we experience a bit what it might be like.? Read on.

THE BASIC (CORE) FORMULA: It is for me, most amazing that all the graphics in this book and infinite sets of others can be created by summing only two equations.

This is for someone who wants to understand the formula that leads to this program. Like watches, cell phones, TV, computers and remotes,it is not necessary to understand it in order to use it.. So don't let the symbols scare you away.These equations were originally produced to describe populations and relate them to fecundity, subsequently by biochemists to describe enzymatic reactions, but for us it is neither.

1. X(m) => r*X(1-X), a series(set) of slices, where X becomes the next and new value of a set, with increasing digital values of m from 1, to some chosen point, as if carving out a new log.

2. T(m) => T+((log abs(r-2*X)) where the next successive total then uses the new X as computed above, to produce a new current total, the result of adding a log to the heap, hence summing the set.

One might think we could use the powerful tool of an integral calculus to create an expression that would easily calculate the sum, T(m), to make the program run like a rabbit. The answer is that the program itself is an algorithm for the unknown integral and is the stuff the computer handles best. It is how it thinks and this is not like you or I.

Page 6: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-3-TRAVELLING IN LYAPUNOV SPACE

In the final analysis, technology has overtaken me, and with more advanced chips, graphics that used to take hours to produce, now takes 20 minutes or so.THE BASIC (CORE) PROGRAM

I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote. In pun, I wrote the first basic working program , in BASIC, my first love. Some will argue that Scientific Language or a C language will run faster. A student versed in these languages should do it. Because of Microsoft's parting of the ways with MacIntosh software, I discovered a new Basic program for which I am most grateful. When it comes to explaining, what I am trying to accomplish, BASIC is KING.

THE STUCTURE OF THESE PROGRAMS (in 6 modules)1. THE DECLARATION OF THE VARIABLES. including the pattern of the genetic

code in a readable sequence.2. THE INITIAL MATRIX, a surface defined – x and y axes- the ranges with three

essential elements – origin, range, and steps that determine magnification3. INITIALIZATIONS of the program; particularly X, our wanderer.4. BODY – with the sequence of calculations producing LYAP indices and

preserving them in piles; finally adding them.5. LOOM- upon which the LYAP sums are mounted and synchronize with the grid.6. VISUALIZING- By their quantity each pixel is assigned an arbitrary colour,

related to the value of LYAP, we get a graphic representation of the quantity LYAP over a surface sector of our choosing.

DIM X as double -X is our mysterious wandering variable – the core of our equations

DIM T1 as double - T1 is the accumulated sum of all elements of the group of 'zeros'.

DIM T2 as double - T2 is the accumulated sum of all elements of the group of 'ones'.

DIM L as Double L and L1 represent a step in the flow of the equation that produces a

Lyap-like quantity. L sums the 'genetic one's our binary program. Note that we sum absolute values only; otherwise all our effort would amount to zero. Also, I don't let some values get to

Page 7: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-4-TRAVELLING IN LYAPUNOV SPACE

be infinite or zero. Otherwise we may get strange lines and blanks in

our picture. DIM L1 as Double DIM n as integer n is a count of a number of

repetitions or iterations of the mill that churns out lyap indices.

DIM n1 as integer n1 is an invented clone integer = to n, that I need to sort out, and create the pile related to 'zero', and the

pile related to one. I did not use n because this may upset the value

of n, doing its work in the loop in certain programs.

DIM r1 As double We are setting the loom, or matrix DIM r2 As double of all values of our lyap, upon a

space or surface. r1 is the X axis; r2 is the Y axis, but it measures downward instead of the usual

upwards; it is really -Y. DIM r(13) as integer We are reserving spaces for the 12 (DIM r(12) works as well) numbers used, in the memory of

our computer for our 'genetic code' that lends the uniqueness to our Lyap-like function, and its appearance on the screen. DIM a as integer To compute LYAP we need as many

iterations as is practical – more iterations also take more time. -a- represents the first loop to do this.

At least 15 iterations produces a stable result.

Page 8: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-5-TRAVELLING IN LYAPUNOV SPACE

DIM LL as double LL is the counterpart for L which is DIM LL1 as double in the 'genetic zero' pile

DIM LYAP as double LYAP is the sum of the 2 piles, and

our final result, a rough approximation of the ideal and true LYAP number. DIM aa as double aa.bb represent a second loom onto

DIM bb as Double which we mount our LYAP numbers so we can visualize them according to their magnitude, as well as their position. This gives us visual LYAP space, if all goes well. Remember,it is essential that both looms be synchronized, point for point, when you play with it.

I've declared my constants and variables, that I might have to use in my program. I have reserved spaces for them in the hotel of my program. I might not need so many guests at the party. Who knows.

r(1)=0 r(7)=0 r(2)=1 r(8)=1

r(3)=0 r(9)=0 r(4)=1 r(10)=1

r(5)=0 r(11)=0 r(6)=1 r(12)=1This is something different; it is an array of values that r(n) can take in sequence, and can be read by the program, as n goes from 1 to 12. In combination with n=1 to 12, it churns out a series , as it rotates and repeats, what is for this program, a GENETIC CODE. (not to be confused with it's use in biology.)The code rotates over and over, 'a' times. It gives the uniqueness to each program.

For r1=.15 to 9 step 0.010//900 REM: our surface grid. For r2=2.74 to 9 step 0.010//600

The initial value, the ORIGIN for this particular graphic, an arbitrary .15 and 2.74 are supreme; they define where you begin weaving, in the whole surface of the space we make, for we are visualizing only a small part of it.This is the grid r1 and r2. It describes a rectangular surface. r1 is a series of X lines delimited by .15 to 9, spaced at 0.01. That is there are about 900 lines across our grid. We can indicate this in our space for comment after //.However, each line has about 600 points in the Y axis spun from top to bottom.

Page 9: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-6-TRAVELLING IN LYAPUNOV SPACE

That is to say it is a Y axis in reverse. In older programs, you could see the weaving process unfold before your eyes.

But that gives us about 540,000 points in our grid; each point has a magnitude and colour that spin into lines from top to bottom, terminate, and continue in a new line to the right of the previous one, until the program ends. It's like weaving. -step 0.01- defines our 'magnification' and a level of observation.

THE PROTOTYPE PROGRAM IN REALBASIC. (FIG 1) PLATE 1

- PROGRAM 1 -1. THE DECLARATION OF THE VARIABLES

DIM X as double rem: This is the section to declare (DIM)variables DIM T1 as double DIM T2 as double DIM L as Double DIM L1 as Double DIM n as integer DIM n1 as integer DIM r1 As double DIM r2 As double

DIM a as integer DIM r(13) as integer DIM LL as double DIM LL1 as doubleDIM LYAP as double

DIM aa as double DIM bb as Double

r(1)=0 r(7)=0 r(2)=1 r(8)=1 r(3)=0 r(9)=0 r(4)=1 r(10)=1

Page 10: TRAVELLING IN LYAPUNOV SPACE - Your Book · THE BASIC (CORE) PROGRAM I call this the basic program for two reasons. Firstly, it was the prototype of all subsequent programs I wrote

-7- TRAVELLING IN LYAPUNOV SPACE

2. and 3.THE INITIAL MATRIX AND THE DECLARATION OF VARIABLES

10: For r1=.15 to 9 step 0.01020: For r2=2.74 to 9 step 0.010

21: X=0.522: T1=023: T2=026: L=Pow(3,-20) 27: L1=Pow(3.1,-20) 4 THE BODY

30: For a=1 to 1535: FOR n=1 to 1236: n1=n

37: IF X>.998 THEN38: X=.99839: END IF40: IF X<.003 THEN41: X=.00342: END IF50: IF r(n1) =1 and X< .999 Then51: X = X*(1-X)*r252: END IF60: IF r(n1) =0 and X<.999 Then61: X =X*(1-X)*r162: END IF935: next rem: Last 2 digits of '900' group

points back to the start of its loop70: L1=ABS(r1-2*X*r1)+Pow(2,-19)71: L=LOG(L1)/LOG(10)72: IF L1>Pow(2,20) Then73: L1=Pow(2,20)74: END IF

80: IF r(n1)=0 Then