ISSN 0964-5640

FRACTAL REPORT 25

Editorial and Announcements 2

Using Complex Variables in QuickBasic - II Cecil J. Freeman 4

Cheap Iterative Processes Mieczyslaw Szyszkowicz 6

Fast Hyperbolic Patterns John Greening 10

Iterations with Transformed Argument Mieczyslaw Szyszkowicz 12

Notes on the Newton-Ralphson Method Cade Roux 14

Review: Chaos Data Analyzer John de Rivaz 16

Patterns of Territories Mieczyslaw Szyszkowicz 18

A Note on Distance Between Sequences Mieczyslaw Szyszkowicz 20





Fractal Report is published by Reeves Telecommunications Laboratories Ltd.,

West Towan House, Porthtowan, Truro, Cornwall TR4 8AX, United Kingdom.

Volume 5 no 25 First published February 1993. ISSN 0964-5640.



Editorial



The back numbers of volume one, 0-6, will soon be exhausted, and as there is insufficient demand to reprint them, this volume will be consigned to microfiche, and will then only be available in that form. Readers of volume one can get articles in which they are particularly interested printed on paper at public libraries or microfiche agents.



If you have written a learned paper linking fractals with some other discipline, please let me have a photocopy so that I may mention it.



I would be grateful for some contributions for the next issue, preferably before the end of February. The article pile is almost empty now.



The graphic on the front page was obtained when Helen Breene, a friend of Chrissie, typed in some numbers chosen at random into a Fractint fractal.



Fractal Report has survived its price rise surprisingly well - we were over 80 strong at the end of December and they are still coming in daily. I cannot help but feel that if I had started on bankers orders I would have retained far more of the readership.



One reader raised the problem of banker's orders and authors free volumes. Many of the authors are regulars and hence there is no problem. Others can always write to their banks and suspend their SOs for one year, or alternatively make a voluntary subscription!

A couple of readers wrote in to explain that they were not renewing their subscriptions, not because of the price rise, but because the contents were too self-similar. This is a characteristic of fractals, but we hope to make the contents as varied as possible by introducing such topics as fractal music, prose etc. Surprisingly only one person sent in a blank disk for the Mark V. Shaney program - perhaps most of you have it already.



Work to extend the readership needs to be continued. In particular, there is no mention of Fractal Report in Fractint, and the authors of Fractint don't seem to use old fashioned post. Therefore I would be grateful if those of you who have access to comms to perhaps mention it to the Fractint originators.

Announcements

More on the Ikenaga Set



After the last issue went to press, we received a further letter from Joyce Haslam concerning the Ikenaga Set. She has been in communication with Roderick Stewart who says the correct formula is

IkenagaX(XAXIS)={z=0,c=pixel:z=z*z*z + z*(c-1)-c, |z|<=4}



I would comment that the object produced in the article in Fractal Report 24, page 5 can be produced by the Fractint formula above (as well as Larry Cobb's Dragons 4 and AFG's !Fractal but that the set produced by the formula in that article

Unknown(XAXIS)={z=pixel: z=z*z*z+(pixel-1)*z-pixel,|z|<=4}



is in many respects an interesting object in its own right. Perhaps someone can give it a name? Another interesting set is produced by the formula

ike4(XAXIS)={z=0,c=pixel:z=z*z*z*z*(c-1)-c,|z|<=4}



Joyce also advises that 3�" disks in thin envelopes have a habit of escaping. I can recall similar problems with Sinclair microdrives, especially when they became scarce and expensive. It is better to hide such products with cardboard or use a small jiffy bag, despite the fact that "they" said they could be posted without padding!



Colour Printing



We have had a request from a reader for any information on how to print PC screens and data files in colour using a Hewlett Packard Deskjet 500C. So if anyone has used one of these successfully, then here is the chance to write an article for Fractal Report.



USENET Information



Dr Gabriel Landini has kindly sent us the following information that may be of interest to readers:



In USENET there are several discussion groups which could be of interest to Fractal Report readers.



sci.fractals on fractals Fractint, programs, ftp sites etc.

bionet.infotheory on Shannon's information theory (information entropy etc.)

comp.theory.cell-automata on cellular automata

comp.theory.self-org-sys on artificial life, self-organised criticality,antichaos, etc.

comp.theory.dynamic-sys on dynamical systems



FRAC-L is an e-mail discussion list on fractals. To subscribe: if you have access to e-mail, you should send a message saying:

SUBSCRIBE FRAC-L <your real name>

to: [email protected]



Amygdala 29 - M set Interior



The 29th issue of Amygdala saw a further drop in circulation to 480 subscribers. However it contained an interesting article on the interior of the Mandelbrot Set by John Dewey, which included some pseudo code to enable readers to emulate the results. Mieczyslaw Szyszkowicz described some iterative processes, with diagrams but without any code. A large part of the issue was taken up with frequently asked questions on the Usenet alt.fractals. Amygdala Box 219 San Christobal NM 87564 USA. $39 pa overseas, $25 US.



Mazes for the Mind: Computers and the Unexpected

Now Available



A recent note from Dr Clifford Pickover stated that the abovementioned book is now available. (Please see Fractal Report 22 page 2 for full details.) Although I haven't seen a copy at the time of writing, from the contents list and experience of Dr Pickover's previous books, it look a good read.



Example of Fractal Play Writing



An episode of Casualty on BBC 1 before Christmas has what I consider to be an example of fractal prose. The plot concerned a man whose family farm had finally gone bust and who went berserk with his shotgun. As a result his family were in hospital, where the wife went berserk (without a shotgun). The reasons for these two people going berserk were the failure of the professions; banking, legal, accounting in one case and medical and nursing in the other, to deal with the overall needs of their clients. The fact that one leads on to the other and the self-similarity of the results I thought could be regarded as fractal prose.



Of course I do appreciate that a true fractal will go on for ever, so true fractal prose has to be computer generated and continue until the operator gets bored with reading it. Mark V. Shaney will produce endless prose, but as far as I know its processes aren't fractal.



Vicki and Sirius Program



Issue, PO Box 3707 1001 Amsterdam Holland has announced improvements to its fractal program for the Vicki and Sirius computers. (These are MSDOS type computers that use improved disc hardware compared to basic PCs. However as the improvements made the disks incompatible, they became obsolete. In their day, they were very expensive, the Vicki costing about �2,500. Now you can get one for only �100!) If you have one of these machines and want to run fractal programs, then write to these people for their disk asking for ORBIC, and enclose �6. They also develop new hardware peripherals for these machines, and have a range of products on offer.



They run a number of programming projects, one of which is a hard disk defragmentor using MSDOS calls. "All that would be required is the ability to copy every sub-directory to a reserved area of memory or another drive, delete the original, and then copy back in a structured fashion over the entire disk." MMM! I gather that MSDOS 6.0 will include both defragmentation and compression programs as standard.



Fractal Shopper Goes out - At Last



Fractal Shopper was supposed to be a money earner to support Fractal Report. It would be mailed to everyone on the mailing list (a little short of 2,000) and paid for by advertising. However only three advertisements were offered, and this would not have met the costs. Then Pitman Publishing agreed to mail it with their catalogue to all the names on the list in UK and Europe.



The revenue received for the three advertisements would pay for the printing, and mailing to the rest of the world, and, of course Pitman would meet the fairly considerable cost of mailing to UK and Europe.



The problem arose when Pitman continually delayed mailing out the catalogue. Eventually I found that they were mailing it out in dribs and drabs. As we approached Christmas I advised them to stop, as any recipients would be too busy with the festivities to respond. However mailings will continue in the new year. Of course Fractal Shopper mentions Fractal Report and my other publications, and there have been a few lapsed subscribers deciding to buy some of the back issues or see sample copies of Longevity Report.



REC Double Issue Bemoans Demise of Small Programs



In the editorial for issues 5 and 6 of volume 7 of REC, editor Dr Michael W. Ecker mourns the trend to megabyte spectacular "applications" and the lack of support for people who want to write simple short programs. He also mentions that Microsoft may be dropping Quick Basic in favour of Visual Basic, and speculates on the effect on ease of use.



As well as the usual mathematical "quickies" there was a long article for beginners using Quick Basic on how to get colours on the screen. If you don't know, or find it difficult, then I suggest reading it. There were one or two short items, including ferns, but no major fractal article this time. But nevertheless if you are interested in mathematical recreations, then REC is worth its subscription. [REC 909 Violet Terrace Clarks Summit PA 18411 USA, $36 pa worldwide, $28 Canada, $27 USA.]

Using Complex Variables in QuickBasic - II



by Cecil J. Freeman



46 Avenue La Croix, Sea Point, Cape Town 8001, South Africa



In an article in Fractal Report 23 I described a method of operating with complex variables in QuickBasic, to overcome the difficulty that one cannot operate directly with such variables in this language as one can for example in Fortran.



I have since been able to improve on this method by using SUB procedures instead of FUNCTION procedures. The improved method is much simpler and more concise, as can be seen from the attached program.



In the new method only 4 procedures are required - add, mult, scalmult and div. Using these procedures one obtains both components u(1) and u(2) of a complex variable z=u(1)+iu(2) in a single operation.



Thus, for example, in a statement such as



mult w5( ), w1( ), w6( )



w6(1) and w6(2) are the real and imaginary components of w6, the product of



w5=w5(1)+iw5(2) and w1=w1(1)+iw1(2).



As before, the program is in three parts - a main module containing the actual program, a supporting module containing the subprocedures and an include file listing the procedure declarations.



The program chosen here to illustrate the method is that for finding the roots of z7+z2-1 using Halley's method; see the book Computers, Pattern, Chaos and Beauty by C. A. Pickover.



Anyone who has attempted to evaluate the real and imaginary components of a complicated expression such as



z-f(z)/(f'(z)-(f"(z).f(z)/2f'(z))



where

f(z)=z7+z2-1 and z=x+iy,



by algebra, will appreciate the power and simplicity of the method described in this article.



The attached illustration shows output from the program; the x,y ranges are -1,1-1,1, q is 1.5 and the maximum iteration kk is 50.



Listing 1



'Module containing procedures for calculating

'with complex variables.



'A 2-dimensional array such as u() represents a

'complex variable u = u(1) + iu(2).



DECLARE SUB add ((u), v(), ans())

DECLARE SUB mult ((u), v(), ans())

DECLARE SUB div ((u), v(), ans())

DECLARE SUB scalmult (c, u(), ans())



SUB add (u(), v(), ans())

ans(1) = u(1) + v(1)

ans(2) = u(2) + v(2)

END SUB



SUB div (u(), v(), ans())

z = v(1) * v(1) + v(2) * v(2)

ans(1) = (u(1) * v(1) + u(2) * v(2)) / z

ans(2) = (u(2) * v(1) - u(1) * v(2)) / z

END SUB



SUB mult (u(), v(), ans())

ans(1) = u(1) * v(1) - u(2) * v(2)

ans(2) = u(1) * v(2) + u(2) * v(1)

END SUB



SUB scalmult (c, u(), ans())

ans(1) = c * u(1)

ans(2) = c * u(2)

END SUB



'Include file complex2.bi for procedure declarations



DECLARE SUB add (u(), v(), ans())

DECLARE SUB mult (u(), v(), ans())

DECLARE SUB div (u(), v(), ans())

DECLARE SUB scalmult (c, u(), ans())



Listing 2:



'$INCLUDE: 'complex2.bi'



' Program to find roots of z^7+z^2-1=0 using Halley's method

'(see Pickover, p. 276).

'mapping is z=z-q*f(z)/[f'(z)-0.5f"(z)f(z)/f'(z)]

'q is a relaxation coefficient (see Pickover, p.283)



SCREEN 11: DEFINT F, K, N



eps = .000001

c1(1) = -1: c1(2) = 0 'c1=-1

c2(1) = 2: c2(2) = 0 'c2=2



DIM w1(2), w2(2), w3(2), w4(2), w5(2), w6(2), w7(2), w8(2), w9(2)

DIM w10(2), w11(2), w12(2), w13(2), w14(2), w15(2), w16(2), w17(2)

DIM w18(2), w19(2), tz(2)



' INITIALISATION AND SCALING



INPUT "x-limits xmin, xmax"; XMIN, XMAX

INPUT "y-limits ymin, ymax"; YMIN, YMAX

WX = XMAX - XMIN: WY = YMAX - YMIN

PRINT "limits on scale factors:"; INT((640 - 20) / WX); ","; INT((480 - 70) / WY)

INPUT "scale factors fx,fy"; fx, fy

PRINT "limits on graphic resolution (axb):"; WX * fx; ","; WY * fy

INPUT "graphic resolution (a x b points) a,b"; AA, BB

INPUT "no. of iterations kk"; KK

INPUT "components q(1),q(2) of relaxation coefft."; q(1), q(2)

CLS

PRINT "xmin,xmax,ymin,ymax,kk,q(1),q(2): "; XMIN; XMAX; YMIN; YMAX; KK; q(1); q(2)



' SCANNING THE IMAGE



dx = (XMAX - XMIN) / (AA - 1)

dy = (YMAX - YMIN) / (BB - 1)

FOR nx = 0 TO AA - 1: FOR ny = 0 TO BB - 1

z(1) = XMIN + nx * dx: z(2) = YMIN + ny * dy



' ITERATION OF MAPPING



FOR k = 1 TO KK

mult z(), z(), w1() 'w1=z^2

mult w1(), w1(), w2() 'w2=z^4

mult w2(), z(), w3() 'w3=z^5

mult w1(), w2(), w4() 'w4=z^6

mult w4(), z(), w5() 'w5=z^7

add w5(), w1(), w6() 'w6=z^7+z^2

add w6(), c1(), w7() 'w7=z^7+z^2-1=f(z) ****

scalmult 7, w4(), w8() 'w8=7*z^6

scalmult 2, z(), w9() 'w9=2*z

add w8(), w9(), w10() 'w10=7*z^6+2*z=f'(z) ****

scalmult 42, w3(), w11() 'w11=42*z^5

add w11(), c2(), w12() 'w12=42*z^5+2=f"(z) ****

mult w12(), w7(), w13() 'w13=f(z)*f"(z)

scalmult -.5, w13(), w14() 'w14=-0.5*f(z)*f"z)

div w14(), w10(), w15() 'w15=-0.5*f(z)*f"(z)/f'(z)

add w10(), w15(), w16() 'w16=f'(z)-0.5*f(z)*f"(z)/f'(z)

div w7(), w16(), w17() 'w17=f(z)/w16

scalmult -1, w17(), w18() 'w18=-f(z)/w16

mult q(), w18(), w19() 'w19=-q*f(z)/w16

add z(), w19(), tz() 'tz=z-q*f(z)/w16



'FIND ROOT



d = (z(1) - tz(1)) * (z(1) - tz(1)) + (z(2) - tz(2)) * (z(2) - tz(2))

IF d < eps THEN

PSET (20 + nx * dx * fx, 70 + ny * dy * fy), (k MOD 2) * 15

GOTO 100

END IF

z(1) = tz(1): z(2) = tz(2)

NEXT k

100 NEXT ny: NEXT nx



' ENDING

PRINT "Press a key to end"



resp$ = INPUT$(1)



Software Review Chaos Data Analyzer



by John de Rivaz



People frequently ask what use is chaos theory. This application is a collection of 14 programs that allow you to analyze a record of up to 16,382 data points representing some quantity measured at equally spaced intervals. Each program could be produced by the average person with a knowledge of BASIC or some other high level language. However this collection would take many days to write, and indeed if it was presented in a similarly polished manner weeks or even months.

There are many example data files included, for use with the tutorial and suggested activities. These include the output from fractal iterations, daily temperature measurements, and stock exchange quotations. A humorous note attaches to the latter "Predictions based on such data carry no guarantee, but any profits obtained with these techniques should be shared with the program author." To rub it in, the actual file presented is 2000 samples of the S&P Composite index of 500 stocks leading up to the 20% drop that occurred on 19 October, 1987.



I experimented with these predictions, by inputting the quotations for Intel (INTC), one of the makers of the microprocessors used in PCs. I left off four of the most recent prices, 86.50, 85.00, 88.75 and 89.50. I asked Chaos Data Analyzer to predict these, and it came up with 88.64, 88.26, 88.06, and 87.73. You will note that the third one was surprisingly accurate.



The program will find attractors. I show an attempt to find one for the Intel data, and an example from some data they supplied.

In fact, not all fractals have attractors. Although the graph for Intel Inc looks fractal, ie there are large and small rises and falls, it cannot be really predictable. The use of computers by financial professionals to set stock exchange quotations may influence buying and selling and produce some predictable results. However the unpredictable can, in the long term, upset this. One great unpredictable in stock market analysis must be the end of the cold war, and another the thinning of the human population by AIDS. These events do not have counterparts in previous periods of the history of most stocks, and therefore their effects, if any, cannot be predicted by any form of mathematical analysis.



Use of the program



When the files are copied onto the hard disk, typing the word "START" sets the program running, and displays can be obtained by single keystrokes thereafter from a very effective set of menus. Data to be examined is ASCII text in the form of numbers separated by carriage returns. These files are recorded with the suffix .dat, and as stated previously several examples are supplied with the program for experiments.



The command O selects another menu that has a command F which changes the file. If once F has been selected, arrow right and arrow left can be used to move up or down the directory.



If all the various sub-programmes are run, then a printout can be obtained from the entry menu giving various items of information about the data.



No specific facility exists to transfer the output to a file for word processing or graphics, but I have found that WordPerfect's grab can take a graphic screen, and it is possible to output files of numbers that have been manipulated for use in other programs.



The data can be subject to the following forms of analysis:

Data Manipulation: differentiation, integration, smoothing, alternation etc.

Graph of Data: x(t) vs x(t-1) or x(t) vs x(t-1) vs x(t-2) in a perspective drawing. Sound may also be produced by this function, although it is admitted this is more for fun than any serious reason. However some structures may be more discernable to the ear than the eye.

Probability Distribution: Various views showing the probability of occurrence of certain data values.

Polynomial Fit: Produces an equation of the form a + a1t + a2t2 + ... + antn to fit the data. n may be from 2 to 9. You are warned that polynomial approximations diverge rapidly after the end of the record.

Power Spectrum: Views the data as a waveform and looks for spectral peaks.

Dominant Frequencies: similar to above, but using a different method that recognises sharp discrete lines from an otherwise noisy background.

Lyapunov Exponent: you have three parameters to control to get various images.

Capacity Dimension: (also known as Hausdorf Dimension) Produces various plots that enable to user to determine the degree of randomness of the data.

Correlation Dimension: similar to above using different methods.

Correlation Function: Determines the dependence of a given point in its neighbours.

Correlation Matrix: said to extract chaos from the randomness.

Phase Space Plots: Plots the derivative x' against x at each data point.

Return Maps: A variation on the above which produces a strange attractor from chaotic data.

Poincaré Movies: another variation on the phase space idea, producing moving images.



The application is presented on a disk accompanied by a well printed perfect bound paperback book with instructions and a tutorial on running the programs, together with background information. In addition, text can be called up on screen to explain what is going on during each step of the analysis.



The above has been substantially simplified to give readers an idea of what the application contains. I can recommend it to readers of Fractal Report with an interest in serious study of the laws of chaos. I consider the price good value considering the high quality of production and relatively low circulation of such material. Chaos Data Analyzer may be purchased for $103.45 including shipping and handling from The Academic Software Library, Campus Box 8202, North Carolina State University, Raleigh, NC 27695-8202, USA. Fax (919) 515-2682. Further details and a general catalogue may also be requested.


This page hosted by Get your own Free Home Page
Hosted by www.Geocities.ws

1