6
New Methods in Fractal Imaging Michael F. Barnsley, John Hutchinson Australian National University Abstract In this paper we draw attention to some recent advances in fractal geometry and point out several ways in which they apply to digital imaging. Simple applications in- clude a method for animating backgrounds in the produc- tion of synthetic content, including seascapes, forests, and skies; a novel low-cost technique for creating ani- mated talking heads with unique look-and-feel; and the sharing of engaging graphics, at low bandwidth, between wireless devices such as cellphones. These advances make use of an addressing system which may be associated with the "top" of the attractor of an iterated function system (IFS). Previous computer graphics applications of IFS theory have focused on mod- els based on the attractors and the invariant measures of IFSs. The addressing system enables the establish- ment of mappings between attractors; it is these trans- formations, rather than the attractors themselves, that underlie the digital imaging ideas introduced here. 1 Introduction Fractal geometry has previously provided methods for generating digital images which represent terrains, cloud textures and plants; see for example [14], [15], [16] and [17]. Here we report on the relevance of three new mathematical discoveries to modelling and render- ing synthetic digital images. The discoveries relate to IFS theory, see for example [13], [2] and [5]. IFS the- ory, briefly described in Section 2, has been applied to computer graphics, see for example [4] and [11], and to image compression, see for example [3] and [6]. We refer to the new discoveries as (i) fractal tops [8], (ii) the fractal homeomorphism theorem [10] and (iii) - variable fractals [7]. (i) The theory of fractal tops, discussed in Section 2, provides a useful mapping from an IFS attractor into the associated code space. It may be applied to assign colours to the IFS attractor via a method which we refer to as colour-stealing, see Section 3. (ii) The fractal homeomorphism theorem, discussed in Section 4, yields conditions under which two di erent IFS attractors are homeomorphic. The conditions are met by certain pairs of IFSs and result in sometimes beautiful continuous transformations between pictures. For example, animated cloudscapes may be produced using a single fractal homeomorphism plus a single input picture of the sky. (iii) -variable fractals, discussed in Section 5, pro- vide a bridge from IFS attractors to "random" fractals. The symbol represents a positive integer which de- scribes the amount of randomness of a -variable frac- tal. These fractals may be used to provide random variants of a picture or structure. As an example we illustrate how diverse textures can be generated from a single input texture, and how an infinite collection of random synthetic human faces by may defined by a single input image and sampled using random iteration. 2 Tops Functions Let an iterated function system (IFS) be denoted F := {X; 1 } (1) This consists of a finite of sequence of one-to-one con- traction mappings : X X acting on a compact met- ric space (X ) with metric so that for some 0 1 we have ( () ( )) · ( ) for all X, for =12 . It is well-known [13] that there exists a unique non-empty compact set F X, called the attractor of the IFS, such that F = [ ( F ) Let the associated code space be denoted by . This consists of infinite sequences of symbols { } =1 belong- ing to the alphabet {1 }. We write = 1 2 3 to denote a typical element of , and we write to denote the element of . Then ( ) is a compact metric space, where the metric is defined by ( )=0 when = and ( )=2 when is the least index for which 6= . We order the elements of according to i 1 Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06) 0-7695-2606-3/06 $20.00 © 2006

[IEEE International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06) - Sydney, Australia (26-28 July 2006)] International Conference on Computer Graphics, Imaging

Embed Size (px)

Citation preview

New Methods in Fractal Imaging

Michael F. Barnsley, John HutchinsonAustralian National University

Abstract

In this paper we draw attention to some recent advancesin fractal geometry and point out several ways in whichthey apply to digital imaging. Simple applications in-clude a method for animating backgrounds in the produc-tion of synthetic content, including seascapes, forests,and skies; a novel low-cost technique for creating ani-mated talking heads with unique look-and-feel; and thesharing of engaging graphics, at low bandwidth, betweenwireless devices such as cellphones.These advances make use of an addressing system

which may be associated with the "top" of the attractorof an iterated function system (IFS). Previous computergraphics applications of IFS theory have focused on mod-els based on the attractors and the invariant measuresof IFSs. The addressing system enables the establish-ment of mappings between attractors; it is these trans-formations, rather than the attractors themselves, thatunderlie the digital imaging ideas introduced here.

1 Introduction

Fractal geometry has previously provided methodsfor generating digital images which represent terrains,cloud textures and plants; see for example [14], [15],[16] and [17]. Here we report on the relevance of threenew mathematical discoveries to modelling and render-ing synthetic digital images. The discoveries relate toIFS theory, see for example [13], [2] and [5]. IFS the-ory, briefly described in Section 2, has been applied tocomputer graphics, see for example [4] and [11], andto image compression, see for example [3] and [6]. Werefer to the new discoveries as (i) fractal tops [8], (ii)the fractal homeomorphism theorem [10] and (iii) -variable fractals [7].(i) The theory of fractal tops, discussed in Section 2,

provides a useful mapping from an IFS attractor intothe associated code space. It may be applied to assigncolours to the IFS attractor via a method which we referto as colour-stealing, see Section 3.(ii) The fractal homeomorphism theorem, discussed

in Section 4, yields conditions under which two di erentIFS attractors are homeomorphic. The conditions are

met by certain pairs of IFSs and result in sometimesbeautiful continuous transformations between pictures.For example, animated cloudscapes may be producedusing a single fractal homeomorphism plus a single inputpicture of the sky.(iii) -variable fractals, discussed in Section 5, pro-

vide a bridge from IFS attractors to "random" fractals.The symbol represents a positive integer which de-scribes the amount of randomness of a -variable frac-tal. These fractals may be used to provide randomvariants of a picture or structure. As an example weillustrate how diverse textures can be generated froma single input texture, and how an infinite collectionof random synthetic human faces by may defined by asingle input image and sampled using random iteration.

2 Tops Functions

Let an iterated function system (IFS) be denoted

F := {X; 1 } (1)

This consists of a finite of sequence of one-to-one con-traction mappings : X X acting on a compact met-ric space (X ) with metric so that for some 0 1we have ( ( ) ( )) · ( ) for all X, for= 1 2 . It is well-known [13] that there exists

a unique non-empty compact set F X, called theattractor of the IFS, such that

F =[

( F)

Let the associated code space be denoted by . Thisconsists of infinite sequences of symbols { } =1 belong-ing to the alphabet {1 }. We write = 1 2 3

to denote a typical element of , and we write todenote the element of . Then ( ) is acompact metric space, where the metric is definedby ( ) = 0 when = and ( ) = 2 whenis the least index for which 6= . We order the

elements of according to

i

1Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006

where is the least index for which 6= . Thisis a linear ordering, sometimes called the lexicographicordering.Let F denote the associated code space function [13].

Then F : F is the continuous onto functiondefined by

F( ) = lim 1 2 ( )

for some X. The limit is independent of the choice of. The set of codes of a point F , namely 1

F ( ) :={ : F( ) = }, is compact and possesses a uniquelargest element F ( ). We call F : F the topsfunction [8] of the IFS. The set F( ) is shift-invariantand as a consequence there are e cient algorithms forapproximation of F , see [10]. (A subset is calledshift-invariant when = { 2 3 : 1 2 3

}.)The tops function of an IFS may be used to assign

colours to its attractor. It can also be used to con-struct homeomorphisms between attractors. For therest of this paper we restrict attention to the case whereX = ¤ := {( ) R

2 : 0 1 0 1} and thetransformations which comprise IFSs are a ne.

3 Colour-StealingTwo well-known methods by which colours may be as-signed to the attractor F of an IFS F are by indexing,where each point F is coloured according to thevalue of such that ( F), see for example [11],and by using measure theory, see [4]. Indexing does notwork when the attractor of the IFS is overlapping, andthe measure theory method is expensive to compute.The new method, colour-stealing, applies in all cases, ischeap to compute and very versatile. Pictures producedusing colour-stealing may be beautiful and possess dis-tinctive look-and-feel, see Figures 1 and 2.Colour-stealing is defined as follows. Let G :=

{¤; 1 } denote a second IFS and let Q : ¤denote a picture on ¤, namely a function whose domainis ¤ and whose range lies in a colour-space such as= {0 1 2 255}3. Let G ¤. Then we define a

new picture P : F by

P( ) = Q( G( F( )) for all F .

That is, informally, each code (address) is as-signed the colour of the point on the attractor of Ggiven by this code. Each point on the attractor of Fis then given the colour of the "top" code (address) ofthis point. We say that the colours of P have beenstolen from Q, and we call P a stolen picture.The unique look-and-feel of stolen pictures derives in

part from the property that the transformation G F

Figure 1: Attactor of an IFS rendered by indexing (topleft), measure theory (top right) and colour-stealing(bottom left). The image at lower right is the one fromwhich the colours were stolen.

is "almost continuous": the map G is continuous withrespect to the natural topology on code space and Fis continuous at points of F which do not belong toa certain countable set of boundaries, see Chapter 4of [10]. These boundaries may be revealed when colour-stealing is applied, and may combine harmoniously withthe forms and colours in the picture Q.If the picture Q is transformed by a continuous trans-

formation, for example by a horizontal translation, thenthe picture P changes almost-continuously. See for ex-ample the bottom left image in Figure 2. Animations,which can be produced by steadily translating Q whileholding F and G fixed, may seem quite beautiful. Seefor example [9].

4 Fractal homeomorphisms

In certain cases the transformation G F : FG is a homeomorphism. That is, G F is a one-to-one continuous transformation from F onto G andits inverse, given by G F is also continuous. Onesituation where this occurs may be described as follows.Let us write to denote the closure of a subset

with respect to the metric . Let F( ) ={ F ( F) : F( ) = F( )} for all . LetF = { F( ) : }. We call the set of subsetsF the code space structure of the IFS F . The frac-

2Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006

Figure 2: The top left imageP is the attractor of an IFSF of three a ne transformations, rendered by colour-stealing from the image Q at top right. The IFS G, usedto select the stolen colours, is similar to but distinctfrom F . The image at lower left is a 2× zoom on P.The image at lower right is a 4× zoom, but the IFS Ghas been replaced by T GT 1 where T is a horizontaltranslation.

tal homeomorphism theorem, see Chapter 4 of [10], in-cludes the statement that if the two IFSs F and G havethe same code space structure then G F is a homeo-morphism. Roughly speaking this says that if the sym-bolic dynamical systems associated with the tops of thetwo IFSs are topologically conjugate, then the attrac-tors of the IFSs are homeomorphic.

We illustrate applications of this theorem in Fig-ures 4 and 5. To construct Figure 4, the pictures Pand Q are rescaled so that their domains are both¤, and each of the IFSs F = {¤; 1 2 3 4} andG = {¤; 1 2 3 4} consists of four a ne transfor-mations which map ¤ into itself in such a way that ¤is neatly tiled by the four sets 1(¤), 2(¤), 3(¤) and4(¤), and by the four sets 1(¤), 2(¤), 3(¤) and4(¤), as illustrated in Figure 3. It is straightforward toprove that the code space structures associated with thetwo IFSs are the same. Similarly, two tilings of a trian-gle by four triangles are used to construct the homeo-morphism between the top two images in Figure 5. Thetwo rectangular images are frames from an animation

Figure 3: The ranges of the two IFSs used to make thefractal homeomorphism in the pictures of New York.

obtained by translating the original cloud picture side-ways.

5 V-Variable FractalsRather than describing the full theory of -variablefractals and superfractals here, we consider the case= 1, previously noted in [1] and [12], and we refer

to [7] and [10] for the generalization to 1. Let

F = {¤; 1 2 }

denote an IFS for each {1 2 }. Let H denotethe nonempty compact subsets of ¤, and let denoteF : H H denote the function defined by F ( ) =S

( ) for all H, for each {1 2 }. ThenF : H H is a strict contraction mapping with respectto the Hausdor metric on H and

F : ={H : F1 F2 F } (2)

is an IFS. The attractor AF of F is a set of sets and isan example of what we call a superfractal. In contrast,the attractor F of the IFS in Equation 1 is a set ofpoints, a single fractal.The elements of AF may be sampled by means of a

random iteration algorithm, analogously to the way inwhich the points of F may be sampled by the chaosgame, [5]. Let 0 for all {1 2 }, withP

= 1. Then let 0 H and define a sequence

{ } =0 by +1 = F ( ) for = 0 1 2 whereis chosen equal to with probability , independentlyof all other choices. Then two things happen: the el-ements of the sequence { } =0 approximate elementsof AF, being assuredly more and more accurate with in-creasing values of ; and the asymptotic distribution ofthe s is, almost always, the same, namely a certainprobability measure supported on AF. This result is il-lustrated in Figure 6 where we show, from left to right,

3Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006

Figure 4: Before (lower image) and after (upper image)a fractal homeomorphism. See text. The original photoof New York was obtained from BigStockPhoto.com,and its copyright is owned by Brian Kelly.

from top to bottom, 0 1 11. These sets havebeen rendered using a version of colour-stealing. In thiscase = 2 and = 4. Each of the IFSs is defined by atiling of a triangle by four triangles, and the superfrac-tal AF consists of an uncountable collection of picturesof faces. The random iteration algorithm starts out ona polygonal set and, while more and more accuratelyrepresenting members of the collection of faces, approx-imately samples the collection according to a certainfixed probability distribution.

In Figure 7 we illustrate synthetic marble texturesobtained by using three IFSs of a ne maps, each corre-sponding to a di erent tiling of a triangle by triangles.

In the case 1 a more complicated randomconstruction is used. We construct a sequence ofvectors of sets {( 1 2 ) H } =0, where( 0

102

0 ) is chosen arbitrarily and +1 =S( ) where is selected randomly from

{1 2 } and equals with probability , eachchoice being independent of all other choices. The re-

Figure 5: Top two triangular images show before andafter a fractal homeomophism of a triangle to a triangle.The two rectangular images are frames of an animationproduced from the original cloud picture.

sulting sequence of vectors of subsets of ¤ converges,almost always, to the same stationary distribution. Thecomponents of the stationary vectors are called -variable fractal sets and the set consisting of all of themis called a superfractal. The distribution of elements oc-curing in any fixed component defines a certain measureon the superfractal which depends only on the probabil-ities and is correctly sampled by the random construc-tion. As tends to infinity this distribution converges,in the appropriate sense, to a probability distributionon truly random fractal sets, [7]. For computer graph-ics applications, low values of seem to be particularlyuseful, as illustrated by the case = 1, above.

6 Concluding Remarks

We have described briefly some new results in IFS the-ory including the concept of the tops function, colour-stealing, fractal transformations, and superfractals. Forthe interested researcher, a much fuller introduction tothis underlying mathematics is provided in [10]. Wepoint out here that, although the mathematical struc-tures involved may seem at first to be abstract and dif-ficult, the practical methods which they lead to, basedon the chaos game, are simple to implement.We have illustrated a few of many potential appli-

cations. Our goal has been to expose original ideas,based on IFS addressing structures and the fractal con-cept of describing objects by the relationships betweentheir parts, self-referentially. This approach is quite dis-tinct from classical computer graphics wherein models

4Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006

Figure 6: Sequence of images produced by random it-eration on a superfractal, converging to a sequence ofsubtly di erent faces.

are built up from geometrical primitives, and leads gen-erally to rendered images with distinctive look-and-feel.Although we have emphasized computer graphics ex-amples, there are clearly potential applications in otherareas of digital imaging, including encryption, enhance-ment, watermarking, and compression.

References

[1] Asai, T. Fractal image generation with iteratedfunction set. Ricoh Technical Report No. 24, No-vember 1998, 6—11.

[2] Barnsley, M. F.; Demko, S. Iterated function sys-tems and the global construction of fractals. Proc.Roy. Soc. London Ser. A 399 (1985), no. 1817, 243—275.

[3] Barnsley, M. F; Sloan, Alan D. A better way tocompress images. Byte Magazine, January 1988.

Figure 7: Four synthetic marble textures constructedusing 1-variable fractals.

[4] Barnsley, M. F.; Reuter, L.; Jacquin, A.;Malassenet, F.; Sloan, A. Harnessing chaos for im-age synthesis, Computer Graphics, 22 (1988), 131—140.

[5] Barnsley, M. F. Fractals everywhere. Second edi-tion. Revised with the assistance of and with a for-ward by Hawley Rising, III. Academic Press Pro-fessional, Boston, MA, 1993.

[6] Barnsley, M.F; Hurd, L. P. Fractal image compres-sion, AK Peters, Boston, MA, 1993.

[7] Barnsley, M.; Hutchinson, J.; Stenflo, Ö. A frac-tal valued random iteration algorithm and fractalhierarchy. Fractals, 13 (2005), no. 2, 111—146.

[8] Barnsley, M. F. Theory and application of fractaltops. 3—20, Fractals in Engineering: New Trends inTheory and Applications. Lévy-Véhel J.; Lutton,E. (eds.) Springer-Verlag, London Limited, 2005.

[9] Barnsley, M. F.; Barnsley, L. F.; Xie, R. Colour-stealing animations, www.superfractals.com

[10] Barnsley, M. F. Superfractals. Cambridge Uni-versity Press, Cambridge, New York, Melbourne,2006.

5Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006

[11] Demko, S.; Hodges, L.; Naylor, B. Constructingfractal objects with iterated function systems. Com-puter Graphics 19 (1985), 271-278.

[12] Hambly, B. M. Brownian motion on a random re-cursive Sierpinski gasket. Ann. Probab. 25 (1997),no. 3, 1059-1102.

[13] Hutchinson, J. E. Fractals and self-similarity. In-diana Univ. Math. J. 30 (1981), no. 5, 713—747.

[14] Mandelbrot, B. B. The fractal geometry of nature.W. H. Freeman Publishing Company, San Fran-cisco, 1983.

[15] Peitgen, H. -O.; Richter, P. H. The beauty offractals. Images of complex dynamical systems.Springer-Verlag, Berlin, 1986.

[16] Prusinkiewicz, P.; Lindenmayer, A. The algorith-mic beauty of plants. With the collaboration of J.S. Hanan, F. D. Fracchia, D. R. Fowler, M. J. M.de Boer and L. Mercer. The Virtual Laboratory.Springer-Verlag, New York, 1990.

[17] Stewart, I.; Clarke, A. C.; Mandelbrot, B. B.;Barnsley, M. F.; Barnsley, L. F.; Rood, W.; Flake,G.; Pennock, D.; Prechter, R. R.; Lesmoir-Gordor,N.. The beauty and power of fractals. Clear Books,London, 2004.

6Proceedings of the International Conference on Computer Graphics, Imaging and Visualisation (CGIV'06)0-7695-2606-3/06 $20.00 © 2006