HeadA


Fractals

Simple Fractal Generation.

A fractal may be described as an image that is built up out of smaller and yet smaller versions of itself. There are, of course, other more technical definitions, but many of these are only comprehensible to mathematicians. A rhyme that is often quoted in connection with another branch of maths may be appropriate here:-

So naturalists observe, the flea
Hath smaller fleas that on him prey.
And these have smaller fleas to bite 'em.
And so proceed ad infinitum.

Fractals are of interest to computer users simply because computers make generating them possible. There are methods of generating some "classical" fractals using pencil and paper but it takes rather a long time and a lot of work. Nevertheless some were defined in the early 20th century, mainly by the Polish mathematician Waclaw Sierpinsky.

Fractals are collections of "points". These points have no inherent colour and are usually rendered as black on a white ground ie. Black represents a "Point" and white "No Point". This can, of course, be changed to any other pair of colours but there is no colour in the fractal itself. Colours seen in some well known fractal are artifacts of the generating program.

I first got interested when I acquired a copy of a program to generate them. I'm afraid I don't know where I got it from or how old it is. This program is based on information given in the book "Fractals Everywhere"(1) by Michael Barnsley, an acknowledged authority on the subject. I got hold of a copy of this book but found it rather heavy going since, although I have a somewhat mathematical background, it explained everything in terms of the Theory of Sets, a branch of maths I never had reason to study. I did, however, discover that there were two basic methods (algorithms) for generating fractals, the Deterministic Algorithm and the Random Algorithm.

The program I had used the latter. In this the image is gradually built up from the addition of more and more points until such time as there are no further observable changes. The program allows the user to stop the process at any time, leaving a partially developed fractal on the screen. This can produce some very interesting results such as the partially developed fractal "Poodles within Poodles" shown in Fig.1. If this is allowed to fully develop or is generated by the Deterministic Algorithm, it is nowhere near as interesting.

I thought it would be interesting to repeat these and others using the Deterministic Algorithm but couldn't really understand Michael Barnsley's text. I then came across a copy of a book called "Fractals for the Classroom"(2). This book is also very technical but introduces the concept of the "Multiple Reduction Copying Machine" (MRCM). This was a bit more comprehensible in terms of graphical computing techniques and I decided to use this concept to write a fractal generator using the Deterministic Algorithm.

Multiple Reduction Copying Machine (MRCM).

This is a hypothetical photo copier that has more than one lens system, each of which reduces the size of the image being copied and also distorts and/ or shifts its position on the copy. The basic idea is shown in Fig.2 where there is only size reduction (x0.5) and position shift. Fig.2a shows the original image, which can be anything, and fig.2 b shows the first copy (known as the "Blue Print"). It will be seen that one copy has been displaced upwards by half the height of the original and another to the right by the same amount. The third has not been displaced.

In the next iteration the "Blue Print" is copied by the same process giving the image shown in Fig.2c and this again copied to give Fig.2d. After a number of iterations the "final" image of Fig.2g (10th iteration) will be generated. In theory, of course, there never is a "final" image but, since digital images are made up of finite pixels, there comes a point where each successive image is indistinguishable from the last. This is a classical fractal known as Sierpinsly's Gasket (or Triangle).

Computer Emulation of the MRCM.

It is not too difficult to emulate the MRCM on a computer. Two images need to be stored and one of them displayed on the screen. The first "Image" (displayed) can be anything, as long as its pixels are black or white. The second starts off all white.

The first "image" is then scanned and a check is made to see if each pixel is black or white. If white the scan moves on to the next pixel, if black a procedure is called which contains all of the necessary "transforms" representing the "lenses" of the MRCM. These "transforms" are mathematical expressions containing six numbers that define shifts and distortions of the hypothetical "lenses". There may be one or more of these "transforms".

Following this one or more new (black) points are plotted to the second "image", their positions being determined by the "transforms".

When the scan of the first "image" is complete the "Blue Print" will be displayed on the screen.

The next iteration is exactly the same as the first, except that the "source" is the "Blue Print". The third iteration is again identical, except that the "source" is the result of the second. Other iterations follow in the same way until there is no observable difference between two successive ones.

Notes.

(1) Fractals Everywhere by Michael Barnsley, Academic Press, 1988.

(2) Fractals for the Classroom (Part 1). [Heinz-Otto Peitgen, Hartmut Jürgens, Dieter Saupe et al. - Springer Verlag ] See:- Chapter 5 -- Encoding Images by Simple Transformations -- Pages 255 to 318. [A copy is available in Weston Tech. Library - Cannot be borrowed by general public.]

FIG1

Poodles within Poodles - Partially developed fractal generated by the Random Algorithm.


If you are interested in fractals, more examples may be viewed by clicking on Fractal Results
If you wish to generate your own fractals, applications to do this may be downloaded from the Software section by clicking on:- Software
Note:- These applications will only run on RISC OS Machines [not on MS Windows, Mac or Linux platforms]

Return to Main Index

Contact

Page Last Updated:- 22/12/06