ISSN 0964-5640

FRACTAL REPORT 26

Editorial and Announcements 2

Fractal Aggregations- review John de Rivaz 5

Fractal Image Compression Demo Disk - review John de Rivaz 6

Review of CAL software, version 3.5 Larry Cobb 8

Visions of Tomorrow - review John de Rivaz 9

IFS from PI John de Rivaz 10

Fractint Corner - FRM files are Easy Joyce Haslam 12

QuasiJulia 2 Jose E. Murciano 15

QuasiMandelbrot - 1 Jose E. Murciano 16

More Rabbits and Foxes Dolores Garcia Garcia 17

Lasajous Figures and Strange Attractors U. Owenup 20





Fractal Report is published by Reeves Telecommunications Laboratories Ltd.,

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

Volume 5 no 26 First published April 1993. ISSN 0964-5640.



Editorial



The brief mention on dentistry in issue 24 did not pass unnoticed - it was mentioned in a write up in REC. Anyone with any other professional application for chaos and fractals is invited to write in with brief details.



I must apologise for the large number of my own articles and reviews in this issue. No work has been turned away to make room for them, instead I have received very few articles.



Fractal Report is only as good as the articles people send in, and I would urge readers to continue to support it in this manner. Ideally articles come on a PC disk of any size, as WordPerfect files. If you use another word processor, then include a native file (WordPerfect may be able to read it) and also a "WP generic file". This is raw text with CRs at the ends of paragraphs only, and most word processors generate them. Failing that, well printed material is also accepted, so that we can print it as is. Please try to be economical with space and bear in mind the page layout.



Readers may recall from the last editorial that some subscribers said that they didn't renew because of the self similarity of the contents. Therefore we would particularly welcome any way out ideas you have that are relevant to fractals and chaos. Elsewhere in this issue you will see a book review of Visions of Tomorrow. This book covers in brief form many of the unusual ideas about text and sculpture that maybe someone out there can convert into articles of the "hands-on" type with listings I seek for Fractal Report.



I have noticed that a number of products use the parallel port of the PC as an input device, yet there seems to be no documented use of this. If anyone has any ideas as to how to do this, I would be grateful to hear. Larry Cobb suggested that the 8 data bits may be bidirectional, but he knows of no BIOS call for using them as an input. Maybe someone has some ideas on how this may be done. The wiring of the ports as printer output ports only suggest that five lines are input lines, which leaves three more needed. Maybe some of the grounded pins in the printer configuration are actually input pins that are not used.



Important message to traders: If anyone is interested in taking 50+ copies of a single issue of Fractal Report or Longevity Report on a non-return basis for trade, we can negotiate a very much deeper discount depending on print runs and schedules. However overseas they would have to go by surface mail, which takes 1-3 months to USA, less for western Europe. We would also consider negotiating a special rate for bulk supply to schools, to save educators photocopying individual issues for classes.



Announcements



Hard Disk Defragmentor for Only �9



A shareware program used to promote Computer Buyer can actually be registered for less than the cost of the subscription to that journal. If you send �9 to D.J. Harvey PO Box 14 Cardiff CF4 6XW, you will receive Safepack, a program that tidies up the files on your hard disk so that your system runs more efficiently. You are advised to read the instructions very carefully and to back up your hard disk before running it. In addition, you need to remove your autoexec.bak and connfig.sys files, as otherwise they can take up memory or include TSRs that confuse Safepack. The best way to do this is to rename them autoexec.old and config.old, reboot, run safepack, rename them autoexec.bat and config.sys, and then re-boot. Alternatively, format a floppy disk /s to include the system, record Safepack on it, and then start the machine with this disk in drive A, and run Safepack from this disk.



The program as it stands has a limit of 5000 files, which is enough for most people. However if you have a large hard disk and/or a lot of small files then you may need to wait for version 2, which is expected to be released soon. It will use extended memory and will not have this limit.



The advantages of repacking your hard disk files is that the free space on your disk is continuous, not fragmented. If it is fragmented, then disk accesses take longer. Windows swap files don't work on fragmented disks.



Television Film on Mandelbrot Set



Arthur C. Clarke has recorded a 50 minute film for television on the Mandelbrot Set called The Colours of Infinity. At the time of writing I don't know when it will be broadcast.



Fractal Image Compression Code Published



Dr Michael F. Barnsley has published a book called Fractal Image Compression which includes C source code for this and JPEG image compression. Ms Louisa Anson, vice president of Dr Barnsley's company Iterated Systems Inc, says of the book: "This book is perfect for people with an intelligent interest in the practical application of fractals to the real world problem of image compression. As well as detailed mathematical description of the algorithm, it contains C source code for the fractal transform."



UK readers of Fractal Report may obtained this book by sending a cheque for �39.95 to Michael Barnsley 355, Pennbrooke Trace Dunluth GA 30136 USA. (Presumably he has a UK bank account to process the cheques. - USA readers enquire with him first, please.)



The company also publishes a computer program called Images Incorporated. This is intended for desk top publishers, and includes a system for increasing the apparent detail of images using fractal methods, as well as fractal and JPEG compression and expansion.



The program is shipped with 250 24 bit clip art images. Its image enhancement system enables such feats as fitting a 2" x 2" image in a 4" x 4" window without blurring or pixelation, or printing a 300 dots/in image at 1200 dots/in.



It is available retail from Media Magic, PO Box 598, Nicasio, VA 94946, USA for $255 plus postage at cost. They suggest you pay by credit card. UK people may suffer VAT and (duty+VAT) penalties for importing this product, which will be levied by the COD system, together with a charge (+VAT) for charging you these penalties! Alternatively, you could approach Origin IT, 53, Brighton Road, Redhill, RH1 6YL, who are Iterated Systems Inc's UK agents, for a UK retail price.



Images Incorporated requires Windows 3.X in 386 enhanced mode, 4MB RAM, (8 recommended), a mouse and VGA (SVGA recommended) and a windows swapfile of at least 5MB. (The latter is a permanent file on the hard disk created by a Windows utility and used by Windows). The software itself consumes 0.5MB of hard disk space, and the clipart 4MB.



1.4M Publication for PC Users



Mr Jon Horner has kindly sent a review copy of FRAC'Cetera, a publication on a disk for the PC. The disk size is limited to 1.4M or 1.2M as these are the largest sizes available to a wide audience. After de-archiving, there are a lot of document files and a reader with which to read them.



The files are grouped into sections that are changed and sections that are merely upgraded each issue. This means that to get current information on any section covered all you need do is to play the current FRAC'Cetera disk.



The advantages of this form of publication are that one can use the computer to search for topics. I tried to search for information on how to program sound boards from BASIC, and came up with a reference to my mention of it in Fractal Report, but regretfully no answers. A search through the listings of fractal articles produced some from Fractal Report. There are also sections detailing publishers, fractal personalities, and sources. (An extensive bibliography and catalogue of fractal and graphics shareware.) Another advantage is that one can include colour pictures, although initially it produced none when I tried. I found that the reason for this was that I had failed to run the F'CFGAA.EXE file when installing FRAC'Cetera.

There is a disadvantage over written material in that one can't be looking at it at the same time as trying things on your computer (unless you have two that is, or are willing to run each program in two Windows side by side, and suffering the loss of speed and screen resolution or area). However you could always print off the bits that you need to refer to.



A user group for Fractint, FRUG, is supported. The section includes a tutorial and things to try.



Like Fractal Report, FRAC'Cetera has about 100 subscribers, some of whom are exchange or on a free list or whatever. Those who pay, pay �12/�13/�15 or $25/�16 (UK/Europe/N. America/ Rest) for four issues, or �5/�5.5/�6 or $10/�6.5 for a single issue. A free four page A5 leaflet is available which details the contents. (FRAC'Cetera, Le Mont Ardaine, Rue des Ardaines, St Peters, Guernsey CI, UK)



FRAC'Cetera does not have the same coverage of articles on how to do it as does Fractal Report, and of course it is useless to people without a modern PC. However it is an invaluable database of useful addresses and resource information - quicker to access than going through past Announcements in five volumes of Fractal Report. Although some of the resource information may have been taken from here, there is also much that has not been mentioned in Fractal Report.



If as a group they can afford the cost, I would recommend that they get Iterated Systems' PCBook authoring system, as then the images can appear with the text as opposed to by themselves and the file would be 10 to 20 times smaller. Mind you available space is soon filled, so it will soon get up to 1.4M again! Maybe Iterated System would provide them with a copy at reduced cost if they asked nicely - it would certainly boost their publicity. (See item Fractal Image Compression Demo Disk this issue)

Above is another image from FRAC'Cetera. These two images were loaded into PhotoFinish and retouched for best results in monochrome. They are best viewed on screen in colour, of course. Incidentally, FRAC'Cetera gave the address of a colour laser printer bureau - the cost of a page being about a pound. This may be useful for unique semi home made presents.



CAL Update



Mr Timothy Harris' CAL fractal program has undergone a further update to version 3.6. The main addition has been Conway's Game of Life, as it is an area of similar interest. The formula for the Ikenaga set, ""Unami" and Ike4 have been added, together with parts of FracXtra by Dan Goldwater. Eventually these and other formulae will be hard coded for added speed.



A hot key system has also been introduced to speed access to frequently used features.





Copies are available for a blank disk and SAE, or �2.20 to include disc and postage. Overseas readers are asked to send a blank disk plus IRCs. Mr Timothy Harris 5, Burnham Park Road Peverell Plymouth Devon PL3 5QB.



People with access to JANET can download a recent version from the Lancaster University PDSoft Library. (call UK.AC.LANCS.PDSOFT and follow on-screen instructions).



FRACTAL 93



Yvan Bozzonetti writes that there is to be a fractal conference organised by Kingston University from 7 to 10 September 1993. For further information, please write to Miroslav M. Novak School of Physics Kingston University Surrey KT1 2EE. Mr Bozzonetti suggests that the presentations may be very technical for the most part.



REC 7,7



REC volume 7 no 7 arrived the other day. Not much about fractals this time, but there are a large number of amusing short articles, including some mind reading spoofs. The debate about the size of modern programming languages continued, with a mention of the fact that Microsoft's latest version of C++ has a manual over 5000 pages long, occupies over 30MB of hard disk space and the package weighs 35 pounds.

[REC 909 Violet Terrace Clarks Summit PA 18411 USA, $36 pa worldwide, $28 Canada, $27 USA.]



Co-processor Query



Mr Bev Mason (Highlands, Bromash, Ross-On-Wye, Herefordshire HR9 7PR) would like to hear from anyone who can help him with a co-processor problem. He has a 286 16/20MHz machine and has added an IIT 287/20MHz co-processor. The diagnostic disk supplied with the co-processor runs OK, but Fractint in floating point mode crashes. He sent it back, and the replacement arrived promptly, but the problem was repeated.



He wonders whether a proper Intel co-processor would work where this one didn't, but is reluctant to go to additional expense unless he can be sure. Also the socket is in an awkward place where quite a bit of dismantling is required to get at it.



Letter:



From Dr Stephen H. Meech



Although I greatly look forward to receiving and reading my bi-monthly issue of Fractal Report I must confess that much of the more sophisticated mathematics is over my head, with my part-mathematics A-level a decade and a half in the past! Much of my enjoyment consists of copying or converting programs to MS-DOS QBasic or QL SuperBasic or typing in the various Fractint formula suggestions and observing the results. My eight years old daughter is a dab hand at Fractint zooms.



I wonder if a series of fairly basic articles would interest others like myself. I know these matters can be described simply - my introduction to fractals followed the devising of an ultimately fairly sophisticated, albeit slow, SuperBasic Mandelbrot program by following the prose description in a Guardian newspaper computer article. I have never, however, seen the (sic) Julia set explained so clearly and consequently my ability to relate the two remains superficial and I could not even start to devise a program to draw the latter.



I suppose it could be argued that Fractal Report is aimed at more experienced users but they all started somewhere and someone has to cover the basics if your newsletter is to continue to attract and retain subscribers with limited mathematical training.

For example, how on Earth does one make the leap from the Ikenaga equation on page 5 of Fractal Report 24 to the equations under the first paragraph and thence to the Fractint code?



Of course there are various books on the subject and I heard of some I have acquired through Fractal Report special offers. I would like to obtain The Beauty of Fractals but I gather it is out of print.



By the way, following your note in issue 7, is there an efficient way of paying American dollar subscriptions? I would like to obtain REC, but banker's drafts cost �16 which when added to the postage nearly doubles the cost of the subscription. It has been suggested that one can buy dollar bills and send them by registered post.



I will certainly continue subscribing to Fractal Report if only for the bits I can understand. Keep up the good work. I suppose that as a medical doctor I should be interested in your Longevity Report - if you have a spare sample copy I may be tempted!



Comments:



I recommend the purchase of subscriptions and other products, including The Beauty of Fractals through Media Magic PO Box 598 Nicasio CA94946 USA. The allow the use of credit cards and only add the postage at cost. Their catalogue is free.



We are always pleased to send people sample copies of Longevity Report without obligation.



Medical training is largely a matter of memorising descriptions of objects or processes and assembling the memories in the right order to face a given situation. Other areas of science, such as engineering, involve working things out by calculation and design and rely very little on memory. Therefore it is not surprising that Dr Meech has some difficulties. Given that he has managed to write a Mandelbrot program under the described circumstances suggests that he belittles his abilities in this field. There are articles in previous issues of Fractal Report that describe Julia Sets and other fractals in simple terms and there is also a good appendix in Arthur C. Clarke's SF novel which includes the Mandelbrot Set The Ghost from the Grand Banks that may help.





Fractal Aggregation



Software review by John de Rivaz



This image was produced by a shareware program called Fractal Aggregations FR3. It is presented on disk with the usual text file manual and examples. Registration costs $29 (US funds only) and brings the latest version and a printed manual.



The program works, as its title suggests, by random movements of points, that only produce an image if they "attach" to another point. By starting from various images, different patterns can be produced. The registered version of the program has a printed manual that guides you through producing some of the example images.



The images are not as inspiring as some of the mathematical fractals. However the illustrations in the book and on the disk show that with some effort on the part of the user results can be achieved that make this program worthwhile to the artistically minded person wanting to produce some unusual graphic images.



The program can be obtained from

Ed Richards

FRACTAL RECREATIONS

21 Wichard Blvd.

Commack, NY 11725-1706

(516) 543-3850

as a registered copy for $29, or alternativel;y from shareware dealers to try first.

Fractal Image Compression Demo Disk



software review by John de Rivaz



This disk is distributed by Iterated Systems Ltd. Wyvols Court Swallowfield Reading Berks RG7 1PY, and is available free of charge by writing to or calling Mr Jon Blay (0734-880261). Please mention Fractal Report.



There are two programs on the disk, one a PCBook, the other a cut down version of the product Images Incorporated for Windows, which is called FFlite, or Fractal Formatter Lite.



The PCBook is an illustrated dissertation on fractal image compression, with examples. The images appear as you read the text, and using a 386 the images were reconsitituted before I was halfway down the page. On a high end 486 or a Pentium the reproduction would be almost instantaneous. As with most expert system type programs, you could read through it in a conventional manner, or chart your own path through the text by clicking on words. I didn't manage to find a way to move back down the path, as in Windows helpfiles, which was irritating. Otherwise I felt that the book was a delight to read and the overall impression I had of this DOS program was of high quality. A book authoring system is available from Iterated Systems.



Fractal Formatter Lite is a Windows application and collection of fractally compressed images that you can expand and convert into other graphic formats. It actually had the controls for compressing other images, but when tried it came up with a note to the effect that the compressor was not present. This is hardly surprising, as the program containing it Images Incorporated costs �351.33 from Iterated Systems. (It is also available from Media Magic in the States for $255 plus carriage [and if you are unlucky duty and customs handling charges and VAT on cost and VAT on duty and VAT on handling charges etc etc etc etc], see announcements.) However you can use FFlite to see how long your computer would take to decomress various images.

The image to the right was converted to .PCX and send to WordPerfect as a file of over 200K. As a fractal, it occupied only 20K. I would comment, though, that FFlite also converted it to a .TIF file that WordPerfect rejected. If I produce a newsletter of 20 pages with lots of illustrations, it can occupy 5 or 6 megabytes of disk space. I can't keep it on the hard disk once it is no longer being worked on, and it has to be saved on floppies. This wastes a lot of time. If fractal compression was used by WordPerfect, such documents would occupy only 500K and would easily fit onto floppy disks.



If you are a producer of software that handles graphics, then a development pack is available from Iterated Systems for �528. This builds software only fractal image compression and decompression systems into Windows applications. It includes 16 and 32 bit compression routines and a decompression routine together with source code for using these with Visual Basic, Microsoft C and Borland Turbo C++. Included in the price is a copy of Images Incorporated and 100 run time licenses for the software that you produce. Additional run time licenses may be purchased for �1.76 each, or �5,875 for unlimited use. Products using them are identified with a distinctive and attractive hologram sticker.



Together with the demo disk, you receive a bundle of literature about Iterated Systems' products. It is my prediction that this technology has a very long life ahead of it. They already have a hardware video compression board that compresses 30 frames/s in real time. It would find the PAL standard of 25 frames/s easier. The thought occurs to me that fractally compressed video could be a sensible basis for a world tv standard, with decompressors automatically converting to the standard of individual countries where they are sold. In addition, compressed video would occupy very small bandwidths, making video recording and transmission possible in situations where previously impractical. Maybe the high precision rotating heads of video recorders will eventually be replaced by fractal transformation and a return to linear tape transports. Instead of there being one Channel Five, there could be 20 channels of fractal video. High definition electronic still cameras using static RAM storage will become practical products.



At the moment the patents and rights to this technology seem to be held by private companies. Should a public offering ever be made of the stock, then I would urge investors to consider a purchase. Inveitably there is a risk, but it won't be of the technology failing. The risk will be that financial and other professionals will somehow bleed the profits dry. But if they don't, then Iterated Systems and its parent company could become another Apple. By reading Fractal Report you should be aware of the potential of this technology.



The demo disk offered here shows that this compression is not magic as it may sound, but reality. You see a 20K file produce a 200K image before your eyes. There is no way it can be trickery, but a few years ago professional communications engineers would have said that such levels of compression are theoretically impossible. The management of big companies may still doubt whether fractal compression is real, but here is the proof!



Image enhancement also seems like magic, but this material includes a colour post card showing how a fuzzy pixelated image can be restored using this technology, and this subject is also covered on the disk. (The images produced here are from .PCX files from FFlite. Obviously the relatively cheap laser printing process degrades them to an extent compared to the images as they appear on a VDU.) Fractal image enhancement gives rise to the possibility of producing good quality looking prints from relatively low resolution images obtained from video cameras and converted to computer images. How long will it be before a video input board manufacturer wakes up to this and includes the system with his software?



If you have a professional interest in imaging, then I can recommend that you investigate Iterated Systems' products. If anyone buys one of these products, then please write an article for Fractal Report and tell the rest of us how you got on.

Review of CAL software, version 3.5



by Larry Cobb



CAL stands for Chaos And Light and has been written by Timothy Harris as a fractal generation program for IBM PC, running under DOS. The first impression of CAL is good. After a brief introductory screen, the user is faced with a set of pull-down menus. A very wide range of fractal types is offered - 17 hard-coded fractals and a large number of user defined formulae are also supplied, many of which have been described in earlier issues of Fractal Report. The code for the calculation routines also supports a comprehensive range of arithmetic and trigonometric functions so it should be possible to use any Fractint formula with CAL.



As you begin to work with CAL, however, the organisation of the menus is not completely obvious. When a great many options are available as here, intuitive menus are always difficult to design. The "variables" input for instance includes the size of the fractal but you have to go elsewhere to enter the number of iterations. I also disliked the way that the fractal co-ordinates were entered. Each corner has to be specified and this means that the same precision is necessary for all four entries. When you consider that more than 10 decimal places may be needed for highly magnified images, you will understand how tedious this can be. Also you have to ensure that the ratio of the sides is the same as the ratio of your screen or the fractal will be distorted. Entering one set of co-ordinates (either a corner or the centre) and a magnification overcomes this problem.



Zooming into the fractal or selecting the Julia set cursor step size both require the use of rather obscure keys. There's a very neat palette editor but again the choice of keys to change the colour values seems rather odd. R, G and B are used (yes you've guessed it) for increasing red, green and blue but E, F and V are used to decrease them. Surely the Shift, Alt or Ctrl keys could have been used to modify the action of R, G and B? In practice, these difficulties are much reduced by the numerous and excellent built-in help screens. The status line also helps in the choice but parts of this text were sometimes obscured by the NUM and INS indicators.



CAL supports many Super VGA modes but I was surprised that the VESA standard is not listed. However, the range of options that is supported is very wide indeed and you would be unlucky not to find a suitable driver for your PC.



It's possible to pick up the colour palette information from previously generated fractals and some interesting effects where possible. Unfortunately I was unable to find a 256 full colour spectrum. I find that this works well with many fractals and, although with CAL it is possible to edit each colour and make up a spectrum palette, I doubt if many users will have the patience to do it!



The fractal can be saved either as a set of values that describe the fractal or as a bit image. The bit image can only be saved after the generation is complete and this might be frustrating if the image takes hours to compute and your local mains is prone to failure (like mine). The file type produced by CAL is non standard and so there is no easy way to use the image with other software (DTP or paint program for example). You'd have to use a screen capture utility to do this.



You might think from my criticisms that I don't like CAL. This is not true - it does what it sets out to do very well and my criticisms are mainly directed at the user interface which is notoriously difficult to get right. When you get over these irritations, you have a very powerful and comprehensive fractal generator at your fingertips. And when I tell you that CAL is free, you'll probably ask me why I didn't mention this before, instead of wasting your precious reading time! All the author wants from you is a stamped addressed envelope and one 3� inch or two 5� inch floppies (or forget the floppies and send him �2.20). If Mr Harris isn't inundated by requests for his program, I won't know the reason why.



Timothy Harris can be contacted as [email protected] or at:

5 Burnham Park Road, Peverell, Plymouth, Devon, PL3 5QB



Book Review: Visions of Tomorrow ed. Dr Clifford Pickover



by John de Rivaz



Do book reviewers always read books cover to cover or do they sometimes just dip in and make the best of what time they have got? Once could start trying to dip into this book, as it is a collection of articles. But one soon becomes hooked and finds that "just one more article" means that the day has gone.



Visions of the Future is not specifically about fractals, but the effect on humanity of technological advances. Several articles cover the subject of fractals directly or indirectly, and there is even a program listing.



There is particular emphasis on art in the 21st century as well as the general impact of technology on lifestyles.



One thing that did disappoint me was that I only found one reference to life extension or immortality, and this wasn't even given in the index. Substantial increase of human lifespan or even abolition of involuntary death is likely to dominate the impact of technology on the history of the next 100 years. To see if anyone reads my reviews or buys the book, there is a free bundle of Art Matrix post cards to the first person who writes in with the correct page number and reference to the subject of aging control.



Nevertheless, articles like the ones found in this book often contain truths that may seem self evident when read, but nevertheless are profound points about which the reader has never thought.



The idea that comes to mind is the statement that people can talk faster than they can write, yet they can read faster than they can listen.



This is very interesting, becuase if people could be connected to machines that write as fast as the user reads, then the speed of communication will be much faster than talking/listening or writing/reading. Apart from this, the ideal is talking/reading and will be achieved when speech to text conversion becomes possible. I don't think there is that long to wait now.



The ammusing corrollary of this is that you can communicate with someone faster by telecommunications using talking/reading than you would fact to face using talking/listening! (One might feel a bit foolish using talking/reading if both people are in the same room.)



At the outset of publishing Fractal Report I had mentioned the possibility of fractal sculpture. It is mentioned in Visions of Tomorrow in the context of stereo lithography - a process where three dimensional objects can be "printed" from a PC! A liquid polymer resin is built up layer by layer to form the object. Although the objects that had been "printed" were not fractals, (Klein bottles, knots etc) it is obvious that this technique could be applied to "printing" fractals.



Some of the articles were written by artists and describe how they "grew up" with computers. One author used an Atari for some while, for example. Therefore Visions of the Future could be inspirational to artistic people wondering whether to get involved with computers.



The use of computers to visualise things was also covered, with displays of gene maps shown, generated by IFS fractals. This may look better in colour, or at least require further work. However it appears to be a promising avenue for research, and indeed could be something done by home researchers with a PC and text files of gene sequences. I am not referring to those 3-D models made with wire and coloured balls, but pictures generated by computers acting on the sequence of letters that make up a genome.



Fractal text is another avenue of research into chaos that I have mentioned before. Visions of Tomorrow goes the other way. An item shows IFS images produced using text from various articles! Nothing artistically stunning, but some definite form and pattern was visible. An article did deal with the effects of computers on the written word, dealing with such matters as interactive novels and computerised story-telling.



Dr Pickover seems to have developed a very good system of producing a proliferation of books about computers, each one as fresh and original as the last. He seems to have access to a large font of articulate and interesting authors. I expect that this series of books will continue and they will enthrall their audiences for many years to come.









IFS from PI



by John de Rivaz



Iterated Function Systems have been described before in Fractal Report.1 A simple program by Dr Keith Wood is reprinted below from Fractal Report 2, slightly edited for TurboBasic.

screen 12

cls

defdbl a-z



data 3,.5,0,0,.5,0,0,.34

data .5,0,0,0.5,0.5,0,.33

data .5,0,0,.5,.25,.5,.33



dim a(4),b(4),c(4),d(4), e(4), F(4),p(4)



read m

let pt=0

for j=1 to m

read a(j),b(j),c(j),d(j),e(j),f(j),PK

let pt=pt+pk: p(j)=pt

next j



window (0,0)-(1,1)



for n=1 to 10000

if instat then end

pk=rnd(1)

if pk<=p(1) then

k=1

else

if pk<=p(2) then

k=2

else

if pk<=p(3) then

k=3

else

k=4

end if

end if

end if

xnxt=a(k)*x+b(k)*y+e(k)

ynxt=c(k)*x+d(k)*y+f(k)

x=xnxt:y=ynxt

if n>10 then pset (x,y)

next n

while not instat

wend



This produces the well known Sierpinski Gasket. I generalised it to allow various other parateters to be added, and the result still gave gaskets:



screen 12

cls

defdbl a-z



data 3,.5,0,0,.5,0,0,.34

data .5,0,0,0.5,0.5,0,.33

data .5,0,0,.5,.25,.5,.33





read m

dim a(7,m)



let pt=0

for j=1 to m

for j1=1 to 6

read a(j1,j)

next j1

read PK

let pt=pt+pk: a(7,j)=pt

next j



window (0,0)-(1,1)



for n=1 to 10000

if instat then end

pk=rnd(1)

for k=1 to m

if pk<=a(7,k) then exit for

next k

xnxt=a(1,k)*x+a(2,k)*y+a(5,k)

ynxt=a(3,k)*x+a(4,k)*y+a(6,k)

x=xnxt:y=ynxt

if n>10 then pset (x,y)

next n

while not instat

wend



I ran this generalised program and still got gaskets. However this time the number of dimensions to the array is variable and the code is shortened.



Someone once sent me a copy of PI.COM that generates the value of PI to any number of digits less than 65000 and expresses it as ASCII text. PI.COM was written on 11 May, 1987 by Stephen Jones, Solid State Equipment Ltd, PO Box 30-089, Lower Nut, New Zealand.



I have always been interested in the idea of images from surds, as regular readers will know, and as there are few articles for Fractal Report this issue thought that I would detail my attempts to use the digits to make an IFS display.



The program that follows uses a text file PI20KB.TXT that containes the ASCII digits for the first 20,000 digits of PI, generated by the abovementioned program.



screen 12

cls

defdbl a-z



dim a(1,1)



data 3,.5,0,0,.5,0,0,.34

data .5,0,0,0.5,0.5,0,.33

data .5,0,0,.5,.25,.5,.33



open "C:\turbobas\programs\pi20kb.txt" for input as #1



colour=1



While not instat and not eof(1)

let m=0

while m<3

let a$=input$(1,1)

let m=val(a$)

wend







erase a

dim a(7,m)



let pt=0



for j=1 to m

let a$=input$(7,1)

for j1=1 to 6

let a(j1,j)=val(mid$(a$,j1,1))/10-.5

next j1

let pk=val(input$(1,1))/10

let pt=pt+pk: a(7,j)=pt

next j



window (-1,-1)-(1,1)



let x=0:y=0

for n=1 to 1000

if instat then end

if x>100 or y>100 then exit for

pk=rnd(1)

for k=1 to m

if pk<=a(7,k) then exit for

next k

xnxt=a(1,k)*x+a(2,k)*y+a(5,k)

ynxt=a(3,k)*x+a(4,k)*y+a(6,k)

x=xnxt:y=ynxt

let c=point(x,y)

if n>10 then pset (x,y),colour

next n



colour=colour+1:if colour=16 then colour=1

wend

end



The image obtained could hardly be described as stunning in the same way as fractal images, but nevertheless it is not purely random in the sense of sending random points to the screen.

This was produced with the program as shown. However there are variations you can try. Putting CLS after the window statement gives different images appearing one after the other. A hot 486 may well give almost a light show effect.



This is very much an experimenters' idea, and I look forward to other attempts to get IFS or other images from PI.



Comments on IFS and random data



Elsewhere in this issue is a review of Iterated Systems' FFlite decompression program. This works on files that have been generated by another program that reduces pictures to IFS codes in order to compress them. I tried feeding the digits of PI to this, but it merely resulted in various error messages. Obviously the decompressor requires structure in the data fed to it, similar to a compiler. Feeding random text to a compiler is hardly likely to produce useful programs! However I would make two deductions from this:



1. If the decompressor is able to tell whether the input is a sensible picture and not random noise, then the compression factor is not greatest achievable.

2. The fact that the SETI project, to receive messages from outer space, hasn't heard anything may not be due to the fact that there are no messages to intercept. A perfectly compressed message may be indistinguishable from random noise to a receiver without the decoding algorithm.



Wild conjectures these may be, but I would be very surprised if they are not true, and indeed I expect that a mathematician would be able to produce a rigourous proof of my assertions about compressed images.



Reference:



1. Dr Keith Wood, Affine Transformations for Graphics, page 4 Fractal Report 2



Fractint Corner: FRM files are easy



by Joyce Haslam, 112 Keighley Road, Colne, Lancs BB8 0PH



I thought that Fractint's formula files were just for the big guys (the techies!), but really they are as straight-forward as any other DOS operation, once you get the syntax right. Load a copy of fractint.frm into your word processor (or Edlin if you must), and you'll find that it is plain ascii text. What's more, it begins with a paragraph of helpful comments and then sample formulae for the original Mandelbrot set and some of its Julias. I'll just rewrite these a bit to emphasize the fact that the Mandelbrot set is the map of the Julia sets.

Mandel (XAXIS) {z = 0, c = Pixel: z = sqr(z) + c, |z| <= 4 }

Julia (ORIGIN) {z = Pixel, c = p1: z = sqr(z) + c, |z| <= 4 }

In writing fractint.frm, Mark Peterson took two quite useful short cuts for the Mandelbrot set. First he did not use the intermediate variable "c". For sets with more complicated formulae, using "c" is itself the short cut. Also, since he could see that the iteration went from z(0) = 0 to z(1) = pixel, he started with z(1), getting an extra iteration free. It is easy to find sets where it is not true that z(1) = pixel, for instance:





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

IkeJulia {z = Pixel, c = p1 : z = z * z * z + z * (c - 1) - c, |z| <= 4 }

where z(1) = - pixel.

There are also sets where the iteration must not start from 0, for instance the self-squared dragons:

SelfSq(XAXIS) {z = 0.5, c = Pixel : z = c * z * (1 - z), |z| <= 4 }

SSqJulia {z = Pixel, c = p1 : z = c * z * (1 - z), |z| <= 4 } (set center-mag=.5/ 0/ 1) where if z(0) = 0, z(forever) = 0.

According to the LambdaMandel section of fractint.doc, in such a set z(0) should be "a point where the derivative of the function is zero". R.T.Stevens (in Fractal Programming in C) used 0.50 without explanation. He recommends the SSdragon at (1.646009, 0.967049). Dr. Mandelbrot himself named the SanMarcos at (2.998122, 0.004298). Its level sets go very steeply into a large well, so it is one on which to press <x> and set inside=bof60 and outside=0 (black). The level sets are so steep that you can even set maxit=32. As soon as you have the dragon drawing, press <b> to generate a frabatch.bat file (which is also ascii text, so you can edit it easily too).



Note that setting c = p1 allows you to type co-ordinates into fractint while it is running, instead of having to alter the formula file itself in a text editor each time. Name the ones you like (that's the hard bit) and add them to the formula file or keep their coordinates in a text file. You can restore saved images and continue calculation on them (ie zooming) if you have already set type=formula and are using a file containing the right formula (name and all). Finding good Julias is a matter of positioning a zoom box on the map with its centre or a corner in an interesting place, pressing <return> to accept the zoom and then <tab> to see the numbers. Alternatively, if you have been given Julia coordinates, replace the "corners = xmax/ xmin/ ymax/ ymin" command with "center-mag = xctr/ yctr/ mag" (note the spelling "center-mag", and don't include the spaces in the batch file!), using the Julia co-ordinates as the centre and 100 for mag. This leaves fractint to maintain the aspect ratio, while you only juggle with one number. A magnification of 100 corresponds to a width of about 0.03, which is small enough to begin to be interesting. To see where you came from, bring up a zoom box (keep it centered: don't use the cursor keys) and press <Ctrl><Enter>.

Try these places on the Ikenaga map (and the Julias at their centres):

network -.009625 .21065

marina .554 .353

canyon -.041765 .34552

harbour .69 .090

Start the marina with mag = 20 to see the wild trees of the northeastern cardiod, and the canyon with mag = 15 for the top of the rotor. All around the edge of the main Ikenaga cardiod are Julias like these:







smith 0 .125 curnow .040 .200

lace -.0084 .23 jewel .5050 .35718

fleurlys .624 0 jikenaga .55464 .36353



By the way, that Ikenaga formula expansion (with z=x+yi, c=a+bi) is really: newx = x*x*x - 3*x*y*y + a*x - b*y - x - a newy = 3*x*x*y - y*y*y + a*y + b*x - y - b



Here is the .frm file:



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

IkeJulia {z=pixel,c=p1:z = z*z*z + z*c -z -c ,|z|<=4}

KevinSmith {z=pixel,c=(0.0, 0.125): z = z*z*z + z*c -z -c ,|z|<=4}



MikeCurnow {z=pixel,c=(0.040, 0.200): z = z*z*z + z*c -z -c ,|z|<=4}



marina {z=pixel,c = (0.566, 0.3375): z = z*z*z + z*c -z -c, |z|<=4}

harbour {z=pixel,c = (0.69, 0.090): z = z*z*z + z*c -z -c, |z|<=4}

twins {z=pixel, c = (0.202020, 0.350109):

z = z*z*z + z*c -z -c , |z|<=4}

jewel {z=pixel,c=(0.5050, 0.35718):

z = z*z*z + z*c -z -c ,|z|<=4}

fleurdelys {z=pixel, c = (0.624, 0.0):

z = z*z*z + z*c -z -c , |z|<=4}

network1 {z=pixel,c = (-.0084, 0.23):

z = z*z*z + z*c -z -c , |z|<=4 }

network2 {z=pixel,c = (-0.01175, 0.20925):

z = z*z*z + z*c -z -c , |z|<=4 }

spin {z=pixel, c = (0.58893, 0.32349):

z = z*z*z + z*c -z -c ,|z|<=4}

jikenaga {z=pixel,c = (0.55464, 0.36353):

z = z*z*z + z*c -z -c , |z|<=4 }



handinhand {z=pixel,c=(-0.15784, 0.32903):

z = z*z*z + z*c -z -c ,|z|<=4}

threeselves {z=pixel,c = (0.69537, 0.18604):

z = z*z*z + z*c -z -c , |z|<=4}

rotor {z=pixel,c = (-.0989, 0.390):

z = z*z*z + z*c -z -c , |z|<=4}



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

SelfSqJul {z=pixel,c=p1 : z = c*z*(1-z), |z|<=4}

SanMarcos {z=pixel, c=(2.998122, 0.004298) :

z = c*z*(1-z), |z|<=4}

SSdragon {z=pixel, c=(1.646009, 0.967049) :

z = c*z*(1-z), |z|<=4}





10 REM *************************

20 REM * QUASIJULIA-2 *

30 REM * *

35 REM * JOSE E. MURCIANO *

37 REM * and JOSE L.VILLANUEVA *

38 REM * Apdo. 192 *

39 REM * 44080 TERUEL (Spain) *

40 REM *************************

50 SCREEN 12:KEY OFF:CLS

55 FOR A=0 TO 15:READ B:PALETTE A,B:NEXT

60 DEFDBL C-Z

65 DIM B(10000)

70 R%=200:MX%=100:LX%=640:LY%=480

80 INPUT "COORDENADA X INFERIOR (POR EJEMPLO:-1.50) ";XA

90 INPUT "COORDENADA X SUPERIOR (POR EJEMPLO: 1.50) ";XI

95 INPUT "COORDENADA Y INFERIOR (POR EJEMPLO:-1.50) ";YA

97 INPUT "COORDENADA Y SUPERIOR (POR EJEMPLO: 1.50) ";YI

98 CLS:INPUT "INTRODUCIR VALOR DE PX (POR EJEMPLO: 1) ";PX

99 INPUT "INTRODUCIR VALOR DE PY (POR EJEMPLO: 1) ";PY

100 CLS

110 DX=(XI-XA)/LX%:DY=(YI-YA)/LY%

120 FOR CX%=0 TO LX%-1

130 FOR CY%=0 TO LY%-1

140 X=XA+CX%*DX:Y=YA+CY%*DY

150 C%=0

160 XX=(X*X)-(Y*Y)-PX:Y=ABS(X*Y)*2-PY

170 X=XX:C%=C%+1

180 IF (X*X)+(Y*Y)>R% THEN Q%=C%:GOTO 200

190 IF C%=MX% THEN Q%=0:GOTO 200

195 GOTO 160







200 PSET(CX%,CY%),Q%

202 A$=INKEY$:IF A$=CHR$(0)+CHR$(79) THEN GOSUB 5000:REM TECLA "FIN"

205 IF INSTAT THEN END

300 NEXT CY%

310 NEXT CX%

320 W$=INPUT$(1)

330 GOTO 5000

340 DATA 0,9,11,15,53,36, 2,38,54,22,26,50,51,31,55,63

5000 REM

5030 XL=64:YL=35

5040 GET(X1,Y1)-(X1+XL,Y1+YL),B

5050 LINE(X1,Y1)-(X1+XL,Y1+YL),11,B

5060 A$=INKEY$:IF A$="" THEN 5060

5070 PUT(X1,Y1),B,PSET

5075 IF A$=CHR$(0)+CHR$(73) THEN XL=XL*1.1:YL=YL*1.1

5076 IF A$=CHR$(0)+CHR$(81) THEN XL=XL*.9:YL=YL*.9

5080 IF A$=CHR$(0)+CHR$(77) AND X1<640 THEN X1=X1+2

5090 IF A$=CHR$(0)+CHR$(72) AND Y1>0 THEN Y1=Y1-2

5100 IF A$=CHR$(0)+CHR$(75) AND X1>0 THEN X1=X1-2

5110 IF A$=CHR$(0)+CHR$(80) AND Y1<350 THEN Y1=Y1+2

5111 XM=XA+X1*DX:YM=YA+Y1*DY

5115 IF A$=CHR$(0)+CHR$(71) THEN GOSUB 5150:CLS:GOTO 100

5120 GET(X1,Y1)-(X1+XL,Y1+YL),B

5130 LINE(X1,Y1)-(X1+XL,Y1+YL),11,B

5140 GOTO 5060

5150 XA=XM:YA=YM:XI=XA+XL*DX:YI=YA+YL*DY

5160 RETURN

10 REM *************************

20 REM * QUASIMANDELBROT-1 *

22 REM * *

25 REM * JOSE E. MURCIANO *

27 REM * and JOSE L.VILLANUEVA *

28 REM * Apdo. 192 *

29 REM * 44080 TERUEL (Spain) *

40 REM *************************

50 SCREEN 12:KEY OFF:CLS

60 DEFDBL C-Z

65 DIM B(10000):X1=0:Y1=0

70 R%=200:MX%=100:LX%=640:LY%=480

80 INPUT "COORDENADA X INFERIOR (POR EJEMPLO:-2.50) ";XA

90 INPUT "COORDENADA X SUPERIOR (POR EJEMPLO: 1.00) ";XI

95 INPUT "COORDENADA Y INFERIOR (POR EJEMPLO:-1.50) ";YA

97 INPUT "COORDENADA Y SUPERIOR (POR EJEMPLO: 2.00) ";YI

98 CLS:INPUT "INTRODUCIR VALOR DE PX (POR EJEMPLO: 0 )";PX

99 INPUT "INTRODUCIR VALOR DE PY (POR EJEMPLO: 0.3)";PY

100 CLS

110 DX=(XI-XA)/LX%:DY=(YI-YA)/LY%

120 FOR CX%=0 TO LX%-1

130 FOR CY%=0 TO LY%-1

140 I=XA+CX%*DX:J=YA+CY%*DY

150 C%=0:X=0:Y=0

160 XX=ABS((X*X)-(Y*Y))-PX+I:Y=X*Y*2-PY+J

170 X=XX:C%=C%+1

180 IF (X*X)+(Y*Y)>R% THEN Q%=C%:GOTO 200

190 IF C%=MX% THEN Q%=0:GOTO 200

195 GOTO 160



200 PSET(CX%,CY%),Q%

202 A$=INKEY$:IF A$=CHR$(0)+CHR$(79) THEN GOSUB 5000:CLS:REM TECLA "FIN"

205 IF INSTAT THEN END

210 NEXT CY%

220 NEXT CX%

230 W$=INPUT$(1)

5000 REM

5030 XL=64:YL=35

5040 GET(X1,Y1)-(X1+XL,Y1+YL),B

5050 LINE(X1,Y1)-(X1+XL,Y1+YL),11,B

5060 A$=INKEY$:IF A$="" THEN 5060

5070 PUT(X1,Y1),B,PSET

5075 IF A$=CHR$(0)+CHR$(73) THEN XL=XL*1.1:YL=YL*1.1

5076 IF A$=CHR$(0)+CHR$(81) THEN XL=XL*.9:YL=YL*.9

5080 IF A$=CHR$(0)+CHR$(77) AND X1<640 THEN X1=X1+2

5090 IF A$=CHR$(0)+CHR$(72) AND Y1>0 THEN Y1=Y1-2

5100 IF A$=CHR$(0)+CHR$(75) AND X1>0 THEN X1=X1-2

5110 IF A$=CHR$(0)+CHR$(80) AND Y1<350 THEN Y1=Y1+2

5111 XM=XA+X1*DX:YM=YA+Y1*DY

5115 IF A$=CHR$(0)+CHR$(71) THEN GOSUB 5150:CLS:GOTO 100

5120 GET(X1,Y1)-(X1+XL,Y1+YL),B

5130 LINE(X1,Y1)-(X1+XL,Y1+YL),11,B

5140 GOTO 5060

5150 XA=XM:YA=YM:XI=XA+XL*DX:YI=YA+YL*DY

5160 RETURN


This page hosted by Get your own Free Home Page

Hosted by www.Geocities.ws

1