ISSN 0964-5640

FRACTAL REPORT 29

Editorial and Announcements 2

Letters 3

More on Legendre's Polynomials Yvan Bozzonetti 5

Hopalong Douglas Skrecky 7

Pickover's Variation of the Mandelbrot Set by Warut Roonguthai 9

Curlicue Advances Dr Hugh Daglish 10

Fractal Sets from Magnetic Model 2 Dr Jules Verschueren 11

Self Similarity in Modular Graphics G. R. Turner 18



Fractal Report is published by Reeves Telecommunications Laboratories,

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

Volume 5 no 29 First published October 1993. ISSN 0964-5640.



Editorial and Announcements

Once again we are short of articles, I am afraid. Longevity Report has a third the subscribers of Fractal Report but they seem to produce more articles - I never have much trouble filling it. This seems to suggest that people are becoming bored with the subject of fractals.



If the autumn does not produce a greater flow of articles the future of Fractal Report must be in doubt. However in a letter published later in this issue, Mr G.R. Turner suggests that the title and scope of Fractal Report be changed to include a wider range of material that will interest people who want to use their computers for experiment rather than just running commercial software.



Letters from readers would be appreciated on this topic, and a selection from them will be printed next time.



It could be said that the topic of fractals has now developed to the area of industrial applications. We are hearing more about the application of Dr Barnsley's fractal compression system for video use. An article in New Scientist of 28 August says that fractal image compression is being considered for a new world video standard.(Page 22)



The wide-spread use of the Fractint program on PCs has meant that people can produce original images for illustrating desk top publishing or music products without really bothering to find out what it is all about. Similar public domain programs exist for other computers and these all produce a disincentive to type in one's own programs.



In fact I wonder how many people now seriously know their way about all the fixed functions in Fractint let alone the formulae.



Fractal music could have been another area for advance, but unfortunately no method of programming PC music cards from BASICs have emerged. Maybe some of the expensive new Windows products will rectify this. If anyone had used Microsoft VisualBasic 3.0 and found he can program his sound card from it, please let the rest of us know! I would suspect, though, that a Windows BASIC would be very slow for fractals compared to a DOS based one.



Spanish Language Book of Fractal Programming in C



Snr José Murciano has sent in a copy of a book Geometría Fractal, subtitled Algorítmica y Representación by Javier Barrallo Calonge.



The book covers most usual fractals, and gives programming examples in C. Presumably Algorítmica doesn't translate to Algorithm and means program instead. However the C programs are not complete with menus and screen drivers etc, and are therefore quite short. So if you understand a little of the language you could probably convert to BASIC or Pascal with not much more trouble than if you were given a real algorithm.



If you don't have a computer that will run Fractint and want to program some of these fractals into a non-PC then this book would be useful, even though the text would be closed to non-Spanish speakers. There are numerous black and white illustrations and some colour plates at the back of this paperback. Snr Murciano will sell copies by mail for 2,000 pesetas, by mail from him at Apdo.192 44080 Teruel Spain. Get a peseta cheque from your bank, payable on a Spanish bank, or buy peseta notes (eg from a returning holidaymaker) and send by registered post. Probably Snr Murciano can use a Eurocheque as well. (I know the address is short, but the mail gets to him!)



REC 53 and 54 Come in Together



Recreational and Educational Computing, to give it its full name, is in its eighth year. No 53/54 contained a brief mention of Fractal Report, suggesting that it has shown an improvement in all directions and Dr Ecker said it "is one of the finer publications I swap with". I can only hope that the articles will continue to come in so we can keep it so! The only other fractal item I spotted was Logical Fractal Triangles, with Mac and PC listings.



There were also several articles on graphics and the usual diet of mathematical problems.



Sinclair Spectrum Emulator



An emulator which enables PC owners to run Sinclair Spectrum programs on their PC is available for �15 from B.G. Services 64, Roebuck Road Chessington Surrey KT9 1JX. It consists of a disk which contains the program and instructions for making a tape interface adaptor which plugs into the parallel port. The adaptor is also available ready made for �11.50, or a more sensitive version which requires a PP3 battery is �35. The standard adaptor is simple to make, requiring only the relevant plugs and a few resistors and capacitors. The emulator is also available as shareware, but this version has no tape software so is only useful for playing the games included with it.



The program will run the Spectrum Trees program offered with early versions of Fractal Report. Anyone requiring the shareware version of the Emulator together with a copy of the Trees program, may get one by writing to Fractal Report enclosing �5 and stating which disk size they would like. However if you wish to copy your own Spectrum programmes from tape to your PC then you will need to buy the full version from B.G. Services.



A PC running the emulator is much more controllable than the original machine, with the function keys still working regardless of the state of the Spectrum program that is running. Instant snapshots of games can be made from the function keys, and re-loading is to all intents and purposes instantaneous. To load a program from tape, you have to make and connect the interface and then press "LOAD" as if you were using a Spectrum, and the program loads. When it has loaded, you press the save function key and it is saved to hard disk. Of course, Spectrum snapshots are very small in relation to hard disk space.



News From FRUG



Fractint v18.1 has public release. The "bug fix" release for Fractint v18.0 is now available, and has regained the speed lost in v18.0. The speed is increasingly dependent on the program's overlay structure, and which compiler is used. The Soupers have worked another small miracle in overlay juggling. The program is available from FRAC'Cetera with the following:

GIFDESK v4.5: views many GIFs simultaneously, great for browsing your GIF collection.

PICLAB v1.91: converts TGA files to GIF (amongst other things) - needed for POVRAY and Fractint TGA files.

PARTOBAT v3.0: makes BAT files to auto run your PAR files.

Jon Horner FRAC'Cetera Le Mont Ardaine Rue des Ardaines St. Peters Guernsey GY7 9EU UK.

3.5"DD UK=�4.00: EUROPE=�4.50: Rest=�5.00/$8.00. Add 50p/$1 for 5.25"DD � cheques payable to FRAC'Cetera - US dollar checks payable to J.Horner. The price includes p&p - airmail overseas.



Unproductive Bureaucracy

Causes Strange Attractions Shop

to Change Hands



Mr Gregory Sams wrote in response to a mailing to businesses re Fractal Shopper 1993: "I couldn't handle the overheads and hassle of running the shop ... so I sold the shop in April of this year." However the shop remains open in the capable hands of Mr Thornton Streeter. Mr Streeter has expanded the shop into "new age" interests. (Address 204, Kensington Park Road London W11 1NR)



The excellent post cards, badges, T-shirts and other fractal products are also available to traders only from Chaos Works, 2, Trevelyan Gardens, London NW10 3JY, tel (44) 081 459 5002, (~ 7354 fax).



It is hardly surprising under these circumstances that Mr Sams was also enthusiastic about Terra Libra, the publishing organisation that offers information on how to arrange your affairs to minimise just those overheads of which he complained. Although American, it is hoped that the international nature of the organisation will give rise to reports that will benefit people in this country before too long. In the meantime, membership gives international investors the chance to use the facilities to protect their assets from the "faecal alchemists". For a definition of this phrase, see the Terra Libra documents.



Mr Sams' fractal products are also being sold via Athena and big record chains, so if you like shopping in person then look for them there.



Disk Conversions



Yvan Bozzonetti kindly advised us of a disk conversions company who offer a format translations service. They are PDSL, Winscombe House Beacon Road Crowbrough Sussex TN6 1UL. However they only appear to offer conversion from various CP/M formats to MSDOS, and the price per disk is �10.50!



This is not good when one realises that there is a shareware program called 22DISK which does the same thing. You get a range of formats with the program, with more to follow if you register. A registered version costs $30 including post to UK from Sydex Inc. PO Box 5700 Eugene OR 97405 USA. Payment is acceptable by credit card, and orders can be faxed to (503) 683-1622. Once you have got the program, of course, you can convert as many disks as you want.



They also offer Anadisk, which claims to analyse disks to identify their formats.



Unfortunately due to what I am told are deficiencies of PC clone disk controllers, the range of disks that can be identified is limited, for example Brother word processors are excluded. A letter to Brother revealed that not only are they incompatible with DOS and CP/M the different models are incompatible with each other!



A letter from Sydex revealed that Brother computers use a spiral format which PC disk controllers can't be programmed to follow. Only the Brother EM-1000 was readable by Anadisk. I should imagine that Brother word processors will go the same way as the Victor Sirius and Vicki computers, which used a non-proprietary system that was superior to the PC system but died through incompatibility. The Vicki was initially priced at about �2,500, but ended its days being sold off by scrap computer dealers at only �100. (The name Vicki is now affixed to a range of PC clones.)



Landini Lectures at FRACTAL '93



Fractal Report contributor Dr Gabriel Landini gave a lecture at the Second International Working Conference Fractals in the Applied Sciences at Kingston University in early September. Readers may recall he has presented work on the fractal nature of the spread of gum disease. At this conference he uses similar principles to model the spread of the herpes virus. He has promised a report of this and another conference for Fractal Report which may appear in this issue or next.



Select Information Exchange to Offer

Fractal Report



Select Information Exchange, (SIE) the innovative New York newsletter publicising agency, has accepted Fractal Report and Longevity Report into its program.



Usually newsletters cannot afford to advertise, as advertising costs are set by what the market will bear, and financially the market is dominated by large organisations with turnovers measured in millions of pounds.



However SIE have introduced a system where advertisement is paid for only on results.



SIE take out large expensive advertisements offering hundreds of newsletters. Customers can select up to twenty from the list, and they pay SIE to receive a sample of each. SIE pass these names on to the publishers, who send a free sample to each enquirer. The publishers also pay SIE a 25% fee on each first subscription taken up following the receipt of the free sample.



SIE offer newsletters from a wide range of subjects, and it is hoped that the inclusion of Fractal Report and Longevity Report on the list will bring an increased number of readers and contributors.



SIE also offer a catalogue of the publications they support. Select Information Exchange 244 West 54th Street New York NY10019 USA.



The Fractal Translight Newsletter



Mr R. L. Bagula, of 11759 Waterhill Road Lakeside California 92040 USA kindly sent a sample copy of his fractal newsletter. It consisted of 17 sheets of photocopied paper, on one side only, of what appeared to be larger sheets reduced to half size. However this rather bizare format contains some original articles, all by Mr Bagula himself.



He appears to have some artistic leanings, and the front page includes some of his work which also appears elsewhere in the newsletter.



As well as covering fractals, the newsletter contains items such as The End of the Cold War, Does it Really Mean Peace? Most of the articles are Fractal Report style with text, a picture and a program listing. I saw several ideas that have not been covered in Fractal Report before.



In addition to these there was an article about modelling physical phenomena with electrical circuits comprising a battery, resistors and capacitors and a switch, a story containing a program listing and picture (I suppose I am right in assuming that the program and picture goes with the story?), a musical score for a short piece for two pianos and a jazz guitar, a comment about Oliver Heaviside, and a grouse about one of Mr Bagula's friends who had failed to subscribe. A photomontage presumably shows him being savaged by a dog.



Mr Bagula asks for donations rather than subscriptions, a practise which myself I don't like and I am ashamed to say seems to prevail in some immortalist circles. Within the USA the minimum amount that gets you a subscription to The Fractal Translight Newsletter is $20, but outside the USA it is $90. There is no information on the newsletter as to how often it comes out. The postage on the sample issue that I was sent was $2.22. That suggests that there are 31 issues per year which is improbable as he couldn't get that many photocopies for only $20. I should think in reality there are probably two issues per year. However some light may be shed on this as I have noted that the front page says "NOV 1993". All the articles are dated and seem to have been written between June and August 1993. The artwork is also dated and was produced during the 1980s.



I would also suggest that Mr Bagula puts his address on the newsletter itself.



I liked the contents of this newsletter and I hope that Mr Bagula is able to find some patrons (I suppose that is what one calls people who make donations rather than subscribe a fixed fee) to continue. Failing that, he should send some of his work to Fractal Report, REC and similar publications so that we can share in his discoveries and ideas.



New Hope for Fractal Report?



Fractal Report got a very brief mention in New Hope International, a review magazine of small press publications. They said Fractal Report was "A magazine of interest to computer buffs and lovers of the strange mathematical based pictures produced on them." I wonder whether they really understood it at all. The reviewed Longevity Report in much more detail, although I have to say that their reviewers didn't seem to like it that much. New Hope International also reviews audio cassettes and computer software. Single copies cost �2 from Gerald England 20, Wenerth Avenue Gee Cross Hyde SK14 5NL UK.



Letters:



From Mr G. R. Turner:



There now appears to be waning interest in fractals. Complexity and artificial life are becoming the "in" subjects. Why not include these somewhat related subjects in Fractal Report? The title could be modified to reflect this and it should then be possible to get some more free publicity from the computer magazines.



From Mr Jon Horner



I was saddened to read that Fractal Report may close through lack of contributors. As currently constructed, it would be dead without its contributors. I enjoy reading Fractal Report very much indeed, and I know there is a need for it. Lack of articles does not mean a lack of interest - just lack of initiative on the part of most readers. The vast majority of people are passive - they do not contribute, only consume.



The "Announcements" on page 2 of Issue 25 included a request for information on how to print PC screens and data files in colour using an HP DK500C. The item also invited an article on the subject.



I do not have first hand experience of the DJ500C, but the same question has been asked in FRAC'Cetera by people who want to print Fractint fractals. The advice given in FRAC'Cetera is summarized as follows:



The Fractint docs do not make any mention of DeskJet support, and we couldn't find DeskJet mentioned by any of the DOS graphics shareware programs which do print. Coincident with this request someone on CIS asked whether Fractint would support DeskJet in the future, and Bert Tyler replied "only if someone sends in the code", and lo!, a volunteer appeared as if by magic. He is planning to write code to support both 500c and 550c (the 500c makes black by mixing the other three colours, whereas the 550c has a "real" black).



Until Fractint supports the DJ500/550C the recommended procedure is to save the image as a .GIF and load that into PaintShop Pro or WINGIF and print from there. If the original questioner's PC screens are not .GIFs, they may be converted using something like Graphics Workshop. The three utilities mentioned above are all shareware programs, and are available from FRAC'Cetera. Disk fee in UK is �4 for a 3.5" DD disk full of programs. Send for a copy of our PD/shareware catalogue.



Jon Horner, Editor, FRAC'Cetera, Le Mont Ardaine, Due des Ardaines, Guernsey GY7 9EU, CI, UK.



From Dr Jules Verschueren



As Fractal Report is really a marvellous, mostly high standard and practical (containing formulas and programmes) publication of its sort, I sincerely hope that it will continue to exist. Is there anything that readers and contributors can do?



Reply:



Thank you for your kind words re Fractal Report. There are several things people can do to keep it alive. One is to keep articles coming in, and the other is to try and mention it when you write articles in other publications, including Fractal Report's address. We send a free introductory issue to anyone who wants it. Also, of course, you can get your friends to subscribe, although I appreciate that this may be difficult.





More on LEGENDRE's polynomials.



by Yvan Bozzonetti



Legendre's polynomials are orthogonal, that is, the integral of the product of two of them is zero if that product uses two different polynomials. If a polynomial is squared, it is interesting to get an integral result of one. This is the so called normalization process, to turn the L-th polynomial P[L] into a normalized one Q[L], we must multiply it by {(2*L+1)/2}^(1/2). In the fractal domain, another normalization seems useful: For large L values, the Z coefficients become important and for all practical purposes the condition Z<=4 is not fulfilled in the first display. We need then to zoom one or more times into the screen center before something appears out of the blue. We must then divide the full polynomial with a fixed large parameter value or multiply it by a small coefficient. As a rule of the thumb, we can choose a value near the largest coefficient found in the polynomial.



From each polynomial, a new set of expressions with the same mathematical properties may be generated. They are the associated Legendre's functions P[L,M]. They are the product of the m-th derrivative of the basic polynomial by: (1 -Z^2)^(m/2). For m = 0, (1 - Z^2)^0 = 1 and the 0-th derivative is the original polynomial, so that P[L,0] = P[L]. On the other hand, m cannot go beyond L: m <= L because of the derivative properties. For P[1] = Z, we have so only:



P[1,1] = (1-Z^2)^(1/2)



For P[2] = (3*Z^2 - 1)/2, the derivatives are: 3*Z and 3, so:



P[2,1] = (1-Z^2)^(1/2)*3*Z

P[2,2] = (1-Z^2)*3



P[3] = (5*Z^3-3*Z)/2 produces the derivatives: 3*(5*Z^2-1)/2; 15*Z and 15 for the first, second and third order respectively. That give the associated formulae:



P[3,1] = (1-Z^2)^(1/2)*3*(5*Z^2-1)/2

P[3,2] = (1-Z^2)*15*Z

P[3,3] = (1-Z^2)^(3/2)*15



At the next step, P[4] = (35*Z^4-30*Z^2+3)/8 with the derivatives:

(35*Z^3-15*Z)/2; (105*Z^2-15)/2; 105*Z; 105 produces:



P[4,1] = (1-Z^2)^(1/2)*(35*Z^3-15*Z)/2

P[4,2] = (1-Z^2)*(105*Z^2-15)/2

P[4,3] = (1-Z^2)^(3/2)*105*Z

P[4,4] = (1-Z^2)^2*105

In the last case, the large multiplicative coefficient will produces some difficulties in the fractal computation. It must be dropped to suppress too much zooming in the first exploratory phase.



With P[5] = (157*Z^5-185*Z^3+75*Z/2)/20 the derivatives are:

(785*Z^4-555*Z^2+37.5)/20;

(314*Z^3-111*Z)/2;

(942*Z^2-111)/2;

942*Z;

942



And the associated functions read:



P[5,1] = (1-Z^2)^(1/2)*(785*Z^4-555*Z^2+37.5)/20

P[5,2] = (1-Z^2)*(314*Z^3-111*Z)/2

P[5,3] = (1-Z^2)^(3/2)*(942*Z^2-111)/2

P[5,4] = (1-Z^2)^2*942*Z

P[5,5] = (1-Z^2)^(5/2)*942



When used in quantum mechanics, these functions are weighted by a given coefficient and more than one are used at the same time to define a basis in a function space. Here are some FRACTINT formulas where P2 is a complex parameter usefull for neutalizing large coefficients in basic functions. The letter Z or C in the formula names is a reminder of what element can be adjusted with P1. A formula including Z in its name is a Mandelbrot-like function, on the other hand, C defines Julia-like displays. When P2 is exploited, the name include the letter P at the end.



P11 = {Z=C=PIXEL:Z=(1-Z^2)^(1/2)+C,Z<=4}

P11Z = {Z=P1,C=PIXEL:Z=(1-Z^2)^(1/2)+C,Z<=4}

P11C = {Z=PIXEL,C=P1:Z=(1-Z^2)^(1/2)+C,Z<=4}



P21 = {Z=C=PIXEL:Z=(1-Z^2)^(1/2)*3*Z+C,Z<=4}

P21Z = {Z=P1,C=PIXEL:Z=(1-Z^2)^(1/2)*3*Z+C,Z<=4}

P21C = {Z=PIXEL,C=P1:Z=(1-Z^2)^(1/2)*3*Z+C,Z<=4}

P22 = {Z=C=PIXEL:Z=C=(1-Z^2)*3+C,Z<=4}

P22Z = {Z=P1,C=PIXEL:Z=C=(1-Z^2)*3+C,Z<=4}

P22C = {Z=PIXEL,C=P1:Z=C=(1-Z^2)*3+C,Z<=4}



P31 = {Z=C=PIXEL:Z=(1-Z^2)^(1/2)*3*(5*Z^2-1)/2+C,Z<=4}

P31Z = {Z=P1,C=PIXEL:Z=(1-Z^2)^(1/2)*3*(5*Z^2-1)/2+C,Z<=4}

P31C = {Z=PIXEL,C=P1:Z=(1-Z^2)^(1/2)*3*(5*Z^2-1)/2+C,Z<=4}

P32 = {Z=C=PIXEL:Z=(1-Z^2)*15*Z+C,Z<=4}

P32Z = {Z=P1,C=PIXEL:Z=(1-Z^2)*15*Z+C,Z<=4}

P32C = {Z=PIXEL,C=P1:Z=(1-Z^2)*15*Z+C,Z<=4}

P33P = {Z=C=PIXEL:Z=(1-Z^2)^(3/2)*15/P2+C,Z<=4}

P33ZP = {Z=C=PIXEL:Z=(1-Z^2)^(3/2)*15/P2+C,Z<=4}

P33CP = {Z=C=PIXEL:Z=(1-Z^2)^(3/2)*15/P2+C,Z<=4}



P41P = {Z=C=PIXEL:Z=(1-Z^2)^(1/2)*(35*Z^3-15*Z)/(2*P2)+C,Z<=4}

P41ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)^(1/2)*(35*Z^3-15*Z)/(2*P2)+C,Z<=4}

P41CP = {Z=PIXEL,C=P1:Z=(1-Z^2)^(1/2)*(35*Z^3-15*Z)/(2*P2)+C,Z<=4}

P42P = {Z=C=PIXEL:Z=(1-Z^2)*(105*Z^2-15)/(2*P2)+C,Z<=4}

P42ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)*(105*Z^2-15)/(2*P2)+C,Z<=4}

P42CP = {Z=PIXEL,C=P1:Z=(1-Z^2)*(105*Z^2-15)/(2*P2)+C,Z<=4}

P43P = {Z=C=PIXEL:Z=(1-Z^2)^(3/2)*105*Z/P2+C,Z<=4}

P43ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)^(3/2)*105*Z/P2+C,Z<=4}

P43CP = {Z=PIXEL,C=P1:Z=(1-Z^2)^(3/2)*105*Z/P2+C,Z<=4}

P44 = {Z=C=PIXEL:Z=(1-Z^2)^2+C,Z<=4}

P44Z = {Z=P1,C=PIXEL:Z=(1-Z^2)^2+C,Z<=4}

P44C = {Z=PIXEL,C=P1:Z=(1-Z^2)^2+C,Z<=4}



P51P = {Z=C=PIXEL:Z=(1-Z^2)^(1/2)*(785*Z^4-555*Z^2+37.5)/(20*P2)+C,Z<=4}

P51ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)^(1/2)*(785*Z^4-555*Z^2+37.5)/(20*P2)+C, Z<=4}

P51CP = {Z=PIXEL,C=P1:Z=(1-Z^2)^(1/2)*(785*Z^4-555*Z^2+37.5)/(20*P2)+C, Z<=4}

P52P = {Z=C=PIXEL:Z=(1-Z^2)*(314*Z^3-111*Z)/(2*P2)+C,Z<=4}

P52ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)*(314*Z^3-111*Z)/(2*P2)+C,Z<=4}

P52CP = {Z=PIXEL,C=P1:Z=(1-Z^2)*(314*Z^3-111*Z)/(2*P2)+C,Z<=4}

P53P = {Z=C=PIXEL:Z=(1-Z^2)^(3/2)*(942*Z^2-111)/(2*P2)+C,Z<=4}

P53ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)^(3/2)*(942*Z^2-111)/(2*P2)+C,Z<=4}

P53CP = {Z=PIXEL,C=P1:Z=(1-Z^2)^(3/2)*(942*Z^2-111)/(2*P2)+C,Z<=4}

P54P = {Z=C=PIXEL:Z=(1-Z^2)^2*942*Z/P2+C,Z<=4}

P54ZP = {Z=P1,C=PIXEL:Z=(1-Z^2)^2*942*Z/P2+C,Z<=4}

P54CP = {Z=PIXEL,C=P1:Z=(1-Z^2)^2*942*Z/P2+C,Z<=4}

P55 = {Z=C=PIXEL:Z=(1-Z^2)^(5/2)+C,Z<=4}

P55Z = {Z=P1,C=PIXEL:Z=(1-Z^2)^(5/2)+C,Z<=4}

P55C = {Z=PIXEL,C=P1:Z=(1-Z^2)^(5/2)+C,Z<=4}



Here I give as an example two Fractint expessions made from P[2,1] + P[2,2] and P[3,1] + P[3,2] + P[3,3] respectively. The parameters T, U, V, arre functions to define with numbers [such: (3.1,1.4) ], P1, P2, PIXEL and operators. For example, T = P1^2*PIXEL+(1,0.2); U = P1*P2/(P1+P2-PIXEL); V = 1+T/U. T,U,V may be too mere complex numbers: T=(0,0.1); U=(0.1,0); V=(0.5,0.1). It may be interesting to produce some tens of copies of a formula with different fixed parameters on a word processor before going to Fractint.



P2TU = {Z=(0,0),C=PIXEL;T= ; U= : Z=T*(1-Z^2)^(1/2)*3*Z - U*(1-Z^2)*3+ C, |Z|<=4}

P3TUV = {Z=(0,0),C=PIXEL; T= ; U= ; V= :Z=T*(1-Z^2)^(1/2)*3*(5*Z^2-1)/2 + U*(1-Z^2)*15*Z + V*(1-Z^2)^(3/2)*15 + C,|Z|<=4}



With P4 the full expession becomes very long, that is, it works slowly and the 200 characters limit turns out to be of concern.



Hopalong



by Douglas Skrecky



Editorial note:

This algorithm was originally attributed to Dr Barry Martin, and is also known as Martin's Mappings.



The September 1986 issue of Scientific American had a discusion of some fractal algorithms. One of these was called Hopalong and it seemed to produce pretty designs at a rather rapid clip. However this algorithm did use the square root function, which is known to operate quite slowly on most computer makes. After tinkering with Hopalong for some time I discovered that this slow function could be replaced with a faster division operation, with a consequent increase in speed. The modified Hopalong program below rewritten in GFA Basic for the Atari ST shows how simply this fractal generator can be implemented.



Now for a little history. In May of 1987 a now defunct Atari 800 computer magasine called Antic published my basic version of Hopalong. It wasn't a smash hit. Running on a modest 6502 CPU based home computer using a slow basic interpretor was not going to do much justice to any fractal algorithm. On the Atari 800 only Mandelbrot Set generators ever received much attention due to the great beauty of their fractal patterns. I wrote one myself and can attest that you needed the patience of Job to obtain worthwhile results. However there did exist a very fast integer only compiler called Action! for the Atari 800 which could yield speeds approaching that of assembly language for a fraction of the programming effort. After some hacking on my part an Action! version of Hopalong appeared in the August 1989 issue of Antic. This complied version replaced division with a right shift operation derived from assembly language and ran roughly 100 times as fast! In December 1990 I placed both the source code and compiled runtime for a deluxe Atari ST GFA-basic version in the public domain. This included facilities for exploring the fractal patterns at various magnifications as well as the capibility for saving to and loading from disk "live" fractal patterns. I hope hackers out there have fun with this program and use it to produce their own high speed fractal generators.



'Atari ST GFA-basic Demo of HOPALONG

@initialize_screen_colors

@new_pattern

WHILE BIOS(1,2)=0 !no keys pressed

IF x>0 THEN

xx=y+x/dither1+cx

ELSE

xx=y+x/dither2-cx

ENDIF

y=cy-x

x=xx

@cycle_colors

PLOT xc+x/128,yc+y/256

count=count+1

IF count>5000 THEN

@new_pattern

ENDIF

WEND

'

PROCEDURE initialize_screen_colors

SETCOLOR 0,0,0,0

SETCOLOR 1,7,1,1

SETCOLOR 2,1,7,1

SETCOLOR 3,1,1,7

RETURN

'

PROCEDURE new_pattern

CLS

x=0

y=0

kolor&=0

xc=320

yc=100

dither1=2+RAND(4)

dither2=2+RAND(4)

cx=2000+RANDOM(1000)

cy=2000+RANDOM(1000)

count=0

RETURN

'

PROCEDURE cycle_colors

kolor=kolor+1

IF kolor>3 THEN

kolor=1

ENDIF

COLOR kolor

RETURN



The Full Program:



' WRITTEN BY DOUGLAS SKRECKY DECEMBER 1990

DIM buffer$(32000)

@initialize

@menu

DO

@read_keyboard

WHILE BIOS(1,2)=clear&

IF x%>0 THEN

xx%=y%+SHR(x%,dither1&)+cx%

ELSE

xx%=y%-(SHR(-x%,dither2&))-cx%

ENDIF

y%=cy%-x%

x%=xx%

kolor&=kolor&+1

IF kolor&>3 THEN

kolor&=1

ENDIF

IF y%>0 THEN

py%=yc%+SHR(y%,sizey&)

ELSE

py%=yc%-SHR(-y%,sizey&)

ENDIF

IF x%>0 THEN

px%=xc%+SHR(x%,sizex&)

ELSE

px%=xc%-SHR(-x%,sizex&)

ENDIF

IF px%>0 AND px%<640 THEN

IF py%>1 AND py%<200 THEN

PSET px%,py%,kolor&

ENDIF

ENDIF

IF key&=dkey& THEN

count%=count%+1

IF count%>50000 THEN

@new_pattern

ENDIF

ENDIF

WEND

key&=INP(2)

LOOP

'

'

'

PROCEDURE initialize

kolor&=1

SETCOLOR 0,0,0,0

SETCOLOR 1,7,1,1

SETCOLOR 2,1,7,1

SETCOLOR 3,1,1,7

clear&=0

left&=203

right&=205

up&=200

descend&=208

larger&=210

smaller&=199

escape&=27

dkey&=100

@new_pattern

RETURN

'

PROCEDURE menu

SETCOLOR 3,7,7,7

CLS

PRINT AT(16,6),"SUPERHOP"

PRINT

PRINT " By Douglas Skrecky"

PRINT

PRINT " Press 'M' to return to this Menu"

PRINT " Press 'L' to Load a fractal picture"

PRINT " Press 'S' to Save a fractal picture"

PRINT " Press 'D' for Demo mode'"

PRINT " Other keys create a single pattern"

PRINT " (While Pattern Growing:)"

PRINT " (To Move Pattern Use Cursor Keys)"

PRINT " (Press 'Insert' to magnify Pattern)"

PRINT " (Press 'Clr Home' to shrink pattern)"

PRINT

PRINT " Press Esc to quit"

REPEAT

UNTIL BIOS(1,2)<>clear&

SETCOLOR 3,1,1,7

RETURN

'

PROCEDURE read_keyboard

SELECT key&

CASE "m"

@menu

CASE "s"

store_parameters

SGET buffer$

SETCOLOR 3,7,7,7

CLS

DIR

PRINT ;"To Save Picture Enter Filename =";

INPUT filename$

BSAVE filename$,VARPTR(buffer$),32000

SPUT buffer$

erase_first_line

CASE "l"

SETCOLOR 3,7,7,7

CLS

DIR

PRINT ;"To Load Picture Enter Filename =";

INPUT filename$

CLS

BLOAD filename$,XBIOS(2)

recall_parameters

dummy&=INP(2)

CASE left&

xc%=xc%-10

@reset

CASE right&

xc%=xc%+10

@reset

CASE up&

yc%=yc%-10

@reset

CASE descend&

yc%=yc%+10

@reset

CASE larger&

IF sizex&>1 THEN

sizex&=sizex&-1

sizey&=sizey&-1

xc%=2*xc%-320

yc%=2*yc%-100

ENDIF

@reset

CASE smaller&

IF sizex&<10 THEN

sizex&=sizex&+1

sizey&=sizey&+1

xc%=(xc%+320)/2

yc%=(yc%+100)/2

ENDIF

@reset

CASE escape&

SETCOLOR 0,7,7,7

SETCOLOR 1,7,0,0

SETCOLOR 2,0,7,0

SETCOLOR 3,0,0,0

EDIT

DEFAULT

@new_pattern

ENDSELECT

RETURN

'

PROCEDURE new_pattern

xc%=320

yc%=100

dither1&=RANDOM(6)+1

dither2&=RANDOM(6)+1

sizex&=7

sizey&=8

cx%=2000+RANDOM(1000)

cy%=2000+RANDOM(1000)

count%=0

@reset

RETURN

'

PROCEDURE reset

CLS

x%=0

y%=0

kolor&=0

RETURN

'

PROCEDURE store_parameters

' save parameters on first line of screen

screen%=XBIOS(2)

LONG{screen%+4}=xc%

LONG{screen%+8}=cx%

LONG{screen%+12}=cy%

LONG{screen%+16}=x%

LONG{screen%+20}=y%

INT{screen%+24}=dither1&

INT{screen%+28}=dither2&

INT{screen%+32}=sizex&

INT{screen%+36}=sizey&

INT{screen%+40}=kolor&

RETURN

'

PROCEDURE recall_parameters

' read parameters from first line of screen

screen%=XBIOS(2)

xc%=LONG{screen%+4}

cx%=LONG{screen%+8}

cy%=LONG{screen%+12}

x%=LONG{screen%+16}

y%=LONG{screen%+20}

dither1&=INT{screen%+24}

dither2&=INT{screen%+28}

sizex&=INT{screen%+32}

sizey&=INT{screen%+36}

kolor&=INT{screen%+40}

erase_first_line

RETURN

'

PROCEDURE erase_first_line

COLOR 0

FOR ex%=4 TO 48*4

PLOT ex%,0

NEXT ex%

RETURN



Pickover's Variation of the Mandelbrot Set



by Warut Roonguthai



In Chapter 48 of Computers and the Imagination,1 Dr Pickover presented a variant of the classical Mandelbrot set. After analysing his psuedocode, I found that the iteration loop was still

z = z� + c

but the usual boundedness test,

z 2 or z� 4,

was replaced by

Re{z�} + Im{z�} 4.



So the Fractint formula for this Mandelbrot variant should be something like this:

MandVariant {

z2 = 0:

z = z2 + pixel

z2 = z*z,

real(z2) + imag(z2) <= 4

}



Do not use z^2 instead of z*z because it is much slower to compute.



The figure below left is from the default window (corners=-2/2/-1.5/1.5). The parameter values different from the defaults are the following:



passes=1 float=y maxiter=60 inside=0 video=AF2



You must use floating-point math. Even with it, errors still occur at some points. At those points, the size of z's grow very large before leaving the iteration loop, too large to handle. Also note that the formula interpreter of Fractint version 18.0 (or later) is much faster than earlier versions. It takes about 4 times as long to compute this image if you use version 17.2 instead of version 18.1.



Reference:



1. Clifford A. Pickover, Computers and the Imagination, pp. 267-269,

Alan Sutton, Gloucestershire, 1991.































(The 256 shade figures by J. de Rivaz)



Curlicue Advances



Hugh Daglish

Here are some further thoughts on the "Curlicue" program: The program starts with small values, which are calculated very quickly. As the values become progressively larger, the calculation becomes slower. However, because of the symmetry of the plotted patterns, it isn't really necessary to calculate all the values. It is sufficient to calculate only the first half, plotting both the incremental segment and its mirror image. The results are identical to those from the original program (apart from some slight differences in the "false" colours) but of course the program now runs very much faster.



Overloading the COS routine can be avoided by subtracting multiples of 2 before calculating the cosines. By combining these techniques, many thousands of "curlicues" can easily be plotted for powers of 5 and many hundreds for powers of 7. Even a hundred or more examples using the 9th power are possible before rounding errors become noticeable.



Incidentally, anyone who ran the program listed in Issue 28 will have realised, I hope, that I had incorrectly labelled one of the illustrations. 12517 should have been 13517.






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

1