<<

Escap e-time Visualization Metho d for

Language-restricted

Iterated Function Systems

Przemyslaw Prusinkiewicz and Mark Hammel

Department of Computer Science

University of Calgary

Calgary, Alb erta, Canada T2N 1N4

e-mail: [email protected]

From Proceeding of Graphics Interface '92, pages 213{223, May 1992

Held in Vancouver, British Columbia, 11{15 May 1992

Escap e-time Visualization Metho d for

Language-restricted Iterated Function Systems

Przemyslaw Prusinkiewicz

Mark S. Hammel

Department of Computer Science

University of Calgary

Calgary, Alb erta, Canada T2N 1N4

Abstract tends it further to language-restricted iterated function

systems, intro duced in [16 ]. They generalize the origi-

The escap e-time metho d was intro duced to generate im- nal de nition of IFS's by providing means for restrict-

ages of Julia and Mandelbrot sets, then applied to visu- ing the sequences of applicable transformations to a par-

alize of iterated function systems. This pap er ticular set. The resulting attractors form a larger class

extends it further to language-restricted iterated function than those generated using ordinary IFS's. The de ni-

systems (LRIFS's). They generalize the original de ni- tion of an LRIFS leaves op en the mechanism for sequenc-

tion of IFS's byproviding means for restricting the se- ing transformations, thus LRIFS's incorp orate the ear-

quences of applicable transformations. The resulting at- lier generalizations committed to a particular mechanism,

tractors include sets that cannot b e generated using or- such as hierarchical IFS's [4 ], so c systems [1 ], recurrent

dinary IFS's. The concepts of this pap er are expressed IFS's [3 ], Markov IFS's [21 ], mixed IFS's [5 ], controlled

using the terminology of formal languages and nite au- IFS's [17 ], and mutually recursive function systems [7, 8].

tomata. Several other authors considered similar generalizations

without giving them a name. Visualization of the attrac-

tors of generalized IFS's has b een addressed by Hart [9],

Keywords: , , escap e-

referring to his earlier results with DeFanti [10 ].

time metho d, graphics algorithm, formal language, nite

This pap er is organized as follows. Sections 2 and 3 sum-

automaton.

marize the background material related to formal lan-

guages and iterated function systems. Section 4 presents

the escap e-time metho d for IFS's in a way suitable

1. Intro duction

for further extensions. Section 5 de nes the language-

restricted iterated function systems. The escap e-time

Although mathematicians have explored the prop erties

metho d is extended to LRIFS's in Section 6. A sp ecial

of since the turn of century, they could not visu-

case of regular languages is considered and illustrated

alize the ob jects of their study without the aid of comput-

using examples in Section 7. Section 8 summarizes the

ers. Computer graphics made it p ossible to recognize the

results.

b eauty of fractals, and turned them into an art form [13 ].

Peitgen and Richter [14 ] p erfected and p opularized im-

ages of Julia and Mandelbrot sets. Manyofthemwere

created using the escap e-time metho d. In its original

2. Formal languages

setting, it consisted of testing how fast p oints z outside

the divergedtoin nity while iterating function

An alphabet V is as a nite nonemptysetof symbols or

2

z ! z + c in the complex plane. The resulting values

letters. A string or word over alphab et V is a nite se-

were interpreted as colors in a two-dimensional image, or

quence of zero or more letters of V , whereby the same let-

heightvalues in a \fractal landscap e" [15 , Section 2.7].

ter may o ccur several times. The total numb er of letters

The escap e-time visualization metho d was extended from in a word w is called its length, and denoted length(w ).

Julia sets to iterated function systems [12 ] by Barnsley [2 ] The word of zero length is called the empty word and

and Prusinkiewicz and Sandness [18 ]. This pap er ex- denoted . The concatenation of words x = a a :::a

1 2 m

In the literature, an IFS is usually de ned as the pair and y = b b :::b is the word formed by extending

1 2 n

hX; Fi. We extend this de nition by sp ecifying the al- the sequence of symbols x with the sequence y , thus

phab et V and the lab eling function h to facilitate the xy = a a :::a b b :::b . If xy = w then the word x

1 2 m 1 2 n

intro duction of language-restricted IFS's in Section 5. is called the pre x of w , denoted x  w . The remaining

word y is called the sux.We assume that the relation 

The function h is extended to words and languages over

is re exive, that is, w  w . The n-fold concatenation of

V using the equations:

aword w with itself is called its n-th power, and denoted

n 0

w . By de nition, w =  for any w . If w = a a :::a ,

h(a a :::a ) = h(a )  h(a )  :::  h(a );

1 2 n

1 2 n 1 2 n

[

R

then the word w = a :::a a is called the mirror im-

n 2 1

h(L) = h(w );

R R R

age of w . It can b e shown that (xy ) = y x for any

w 2L

words x and y .

where the symbol  denotes function comp osition, ?

The set of all words over V is denoted by V , and the

+

set of nonemptywords by V . A formal language over

x  f  f    f = f ((f (f (x))) ):

1 2 n n 2 1

an alphab et V is a set L of words over V , hence L 

?

V . The concatenation and mirror image of words are

The attractor of an IFS I is the smallest nonemptyset

extended to languages as follows:

AX , closed with resp ect to all transformations of F ,

and closed in the set-theoretic sense. Hutchinson showed

L L = fxy : x 2 L & y 2 L g;

1 2 1 2

that the attractor of an arbitrary IFS always exists and

R R

L = fw : w 2 Lg:

is unique [12 ]. Consequently, it can b e found by selecting

a p oint P 2A, and applying to it all p ossible sequences

A language L is pre x extensible if there exists a word

+

of transformations from F :

v 2 V suchthat vL  L. In other words, vw 2 L for

every word w 2 L. The right derivative of a language

?

A =cl(P  h(V ));

? ?

L  V with resp ect to a word v 2 V is the language:

where the symbol cl represents the set-theoretic closure of

?

L==v = fw 2 V : vw 2 Lg:

the argument set. There are several metho ds for nding

the initial p oint P 2A. For example, the xed p ointof

The set of all pre xes of a language L is called the pre x

any transformation F 2F is known to b elong to A [12 ].

closure of L:

A legible notation for sp ecifying transformations is

?

P (L)=fx 2 V :(9w 2 L) x  w g:

needed while de ning particular IFS's. In this pap er

we express transformations by comp osing op erations of

translation, rotation, and scaling in an underlying Carte-

3. Iterated function systems

sian co ordinate system. The following symb ols are used:

Let hX; di b e a complete metric space with supp ort X

 t(a; b) is a translation byvector (a; b).

and distance function d (in this pap er, we will only con-

 a( ) is a rotation by (oriented) angle with resp ect

sider the plane with the Euclidean distance). A function

to the origin of the co ordinate system. The angles

F : X ! X is called a contraction in X if there is a

are expressed in degrees.

constant r<1 suchthat

 s(r ;r ) is a scaling with resp ect to the origin of

x y d(F (P );F(Q))  rd(P; Q)

0 0

the co ordinate system: x = r x and y = r y . If

x y

for all P; Q 2 X . The parameter r is called the Lipschitz

r = r = r ,we write s(r ) instead of s(r;r).

x y

constant of F .

For example, Figure 1 shows the attractor of an IFS

An iterated function system (IFS) in X is a quadruplet

I = hX; F ;V;hi, where the set F consists of two trans-

I = hX; F ;V;h;i, where:

formations:

!

p

 X is the underlying metric space,

2

F = s  r (45);

1

 F is a set of contractions in X ,

2

!

p

 V is an alphab et of contraction lab els,

2

F = s  r (135)  t(0; 1):

2

2

 h : V !F is a labeling function, taking the letters

of alphab et V to the contractions from F . Z 2b

Z1 ~ ~ h(b) Z2a h(a)

Z2 C O R

||Z 3 || ||Z3b || ||Z3a || ~ h(a)

Z

The Figure 1: ~ 3 h(b)

Z3a Z3b

4. The escap e-time metho d

 res (Z ;a)= res(Z ;b) = 0, since Z 62 C ,

1 1 1

~

 res (Z ;a) = 0, since Z  h (a)= Z 2C,

Consider an IFS I = hX; F ;V;hi, where all functions

2 2 2a

~

F 2F are invertible. Let h(a) denote the inverse of the

 res (Z ;a) > res(Z ;b), since kZ k < kZ k.

3 3 3a

3b

1

~

contraction F = h(a) 2F,orh(a)=(h(a)) . The

~

function h is extended to words and languages over V in

Figure 2: Illustration of the residual terms res(Z; a).

away similar to h:

~ ~ ~ ~

h(a a :::a ) = h(a )  h(a )  :::  h(a );

1 2 n 1 2 n

[

with a higher precision, Hepting et al. [11 ] intro duced a

~ ~

h(w ): h(L) =

residual term that re ects the distance b etween the last

w 2L

point in the escap e tra jectory Tr(Q; w ) and the b order

?

of circle C :

A trajectory ofapoint Q with resp ect to a word w 2 V

is the set:

E (Q)=

2

~

Tr(Q; w )=fQ  h(x):x  w g:

~

max flength(w )+res(Q  h(w );a):Tr(Q; w ) Cg:

?

wa2V

The length of w is referred to as the length of the tra-

~

jectory. The escap e-time metho d for visualizing the at-

Let Z = Q  h(w ). The function res : X  V ! [0; 1)

tractor of I is based on the following Theorem, proven

is de ned as follows:

in [18 ]:

res(Z; a)= (1)

8

Theorem 1. (a) If a starting p oint Q b elongs to the

log R log kZ k

if Z 2C and

>

<

attractor A of an IFS I , there exists an in nitely long

~

~

Z  h(a) 62 C;

log kZ  h(a)klog kZ k

tra jectory entirely included in A. (b) If the p oint Q do es

>

:

not b elong to A, all tra jectories diverge to in nity.

0 otherwise:

To estimate the sp eed with which the divergence o ccurs,

The norm symbol kZ k denotes the distance between

we enclose the attractor in a circle. Since attractors of

point Z and the center O of circle C , thus kZ k =

IFS's are b ounded, it is always p ossible to nd a circle C

d(Z; O ). The function res(Z; a) has the following prop-

of a nite radius R , completely enclosing A. The escap e

erties (Figure 2):

time of a p oint Q 62 A is then de ned as the length of

the longest tra jectory included in C :

 it takes a nonzero value if point Z lies inside the

~

circle C and its image Z  h(a) lies outside this circle;

flength(w ):Tr(Q; w ) Cg: E (Q)= max

1

?

w 2V

 it tends to 0 if the p oint Z approaches the b oundary

~

According to this de nition, the function E (Q) is of circle C , and to 1 if the image Z  h(a) approaches

1

integer-valued. In order to represent the escap e time this b oundary.

Observe that, when the length of the longest tra jectory

included in C is incremented as a result of moving the

starting p oint Q towards the attractor, the largest resid-

ual term changes its value from 1 to 0. Consequently,

E (Q) is a continuous function of the p osition of p oint

2

Q in the domain X nA. For a formal pro of of this prop-

erty see [11 ]. A justi cation of the choice of Formula 1 is

given in the App endix.

The escap e-time functions E (Q) and E (Q) are not de-

1 2

ned inside the attractor A, as one can nd there in nite

sequences of p oints remaining in A and therefore remain-

ing in the circle C . In order to make the de nition of the

escap e time computationally e ective, we evaluate the

escap e tra jectories up to a prede ned maximum length

m. The escap e-time functions, limited in this way,can

Figure 3: The dragon curve visualized using the

b e computed in the entire space X using the following

escap e-time metho d

formulae:

E (Q; m)=

1

8

?

0 if Q 62 C or m =0;

<

h form an \ordinary" IFS, and L  V is a language over

the alphab et V .

~

:

(Q  h(a);m 1)g otherwise: 1 + maxfE

1

a2V

Consider a starting p oint P that b elongs to the attractor

A of the IFS I , and let A (P ) denote the closure of the

L

E (Q; m)=

2

image of P with resp ect to the transformations h(L).

8

0 if Q 62 C or m =0;

>

The following inclusion holds:

>

>

>

>

<

if Q 2C; m>0; and



maxfres(Q; a)g

A (P )=cl(P  h(L))  cl(P  h(V )) = A:

L

~

Q  h(a) 62 C for all a 2 V;

a2V

>

>

>

>

>

~

Thus, the set A (P ) generated by the LRIFS I with

:

L L

(Q  h(a);m 1)g otherwise: 1 + maxfE

2

a2V

the starting p oint P 2A is a subset of the attractor A.

For example, consider an LRIFS F = hX; F ;V;h;Li, It is intuitively clear that E (Q; m) = E for all

L 1

1

where:

p oints Q with the escap e time E (Q) less than m,

1

since the recursive formula evaluates step-by-step the

 the space X is the plane,

same tra jectories as its non-recursivecounterpart. Sim-

(Q; m) = E (Q) for all p oints Q such that ilarly, E

2

2

 the IFS F consists of four transformations:

E (Q)

2

carried out by induction on m.

F = s(0:5);

1

Figure 3 visualizes the dragon curve from Figure 1 us-

F = s(0:5)  t(0; 0:5);

2

ing the continuous escap e-time function E (Q; m). The

F = s(0:5)  r (45)  t(0; 1);

3

2

inverse functions are:

F = s(0:5)  r (45)  t(0; 1);

4

p

1

F = r (45)  s( 2);

1

 the alphab et V consists of four letters a; b; c; d,

p

1

F 2): = t(0; 1)  r (135)  s(

2

 the homomorphism h is de ned by:

It is assumed that the circle C has radius R equal to 5,

h(a)=F ; h(b)=F ; h(c)=F ; h(d)=F ;

1 2 3 4

and the limit m is equal to 20. The values of function

E (Q; m) are interpreted as a height eld.

2

 the language L consists of words in which no letter

1

c or d is followed byan a or b.

5. Language-restricted IFS's

1

Thus, L is de ned by the regular expression:

 

L =(a [ b) (c [ d) :

A language-restricted iterated function system (LRIFS)

is a quintuplet I = hX; F ;V;h;Li, where X; F ;V; and L

The escap e-time metho d for LRIFS's is based on the fol-

lowing extension of Theorem 1 from Section 4:

Theorem 2. Consider an LRIFS I = hX; F ;V;h;Li,

L

and assume that the language L is pre x extensible,

vL  L. Denote by A the attractor of the IFS

hX; F ;V;hi, and by A the attractor of I . (a) If a

L L

starting p oint Q 2 X b elongs to the attractor A ,then

L

a b

for any n  0 there exists a word w in the pre x closure

R

P (L ) such that length(w )  n and Tr(Q; w )  A.

Figure 4: Attractor A and its subset A (P )

L

(b) If the p oint Q do es not b elong to A , all tra jecto-

L

R

ries Tr(Q; w ) with w 2 P (L ) diverge to in nity as

length(w ) !1.

Figure 4 compares the attractor A of the IFS I with the

set A (P ) generated by the LRIFS I using the starting

L L

Pro of. (a) Let P denote the invariant point of the

0

p oint P = (0; 0). Clearly, the branching structure of

transformation h(v ). According to the de nition of the

Figure (b) is a subset of the original attractor (a).

attractor A , there exists a word y 2 L such that

L

In general, the set A (P ) dep ends on the choice of the

2

L

P  h(y ) = Q. Since P = P  h(v ), the equality

0 0 0

starting p oint P . Nevertheless, if the language L is pre-

i

P  h(v y )=Q holds for any i  0. Let i satisfy the

0

x extensible (i.e., vL  L), the smallest set A do es

i i R L

inequality length(v y )  n, and w =(v y ) . The word

exist and can b e found as cl(P  h(L)), where P is the

R R

0 0

w b elongs to L and henceforth to P (L ), has length

invariant p oint of the transformation h(v ). This results

greater than or equal to n, and maps p oint Q to the p oint

from the following inclusions, satis ed for any P 2 X :

P 2A :

0 L

n

i 1

~

cl(P  h(L)) = cl(( lim P  h(v ))  h(L))

Q  h(w )=Q  (h(v y )) = P 2A :

0

0 L

n!1

n

= lim cl(P  h(v L))  cl(P  h(L)):

In order to show that the entire tra jectory Tr(Q; w ) is

n!1

included in the attractor A, let us consider an arbitrary

The limits are calculated in the space of all closed

partition of the word w into a pre x x and a sux x ;

1 2

nonempty b ounded subsets of the space X with the Haus-

thus x x = w . From the equality

1 2

dor metric [16 ]. By analogy with the \ordinary" IFS's,

wecall A the attractor of the LRIFS I .

~ ~ ~ L L

Q  h(w )=Q  h(x )  h(x )=P

1 2 0

it follows that

6. The escap e-time metho d for LRIFS's

1

~ ~

Q  h(x )=P  (h(x ))

1 0 2

R ?

While extending the escap e-time metho d to LRIFS's, we

= P  h(x ) 2 P  h(V ) A:

0 0

2

consider mirror images of words and use the following

lemma.

Since this argument holds for any x  w ,we obtain:

~

Lemma. Consider IFS I = hX; F ;V;hi, and let all

Tr(Q; w )=fQ  h(x):x  w gA:

functions F = h(a) 2 F be invertible. Then for any

? R 1

~

word w 2 V , the equality h(w )=(h(w )) holds.

(b) Let C b e an arbitrary circle enclosing the attractor A,

and R denote the radius of C . Wehavetoprove that if

Pro of. The set F forms a group of transformations

Q 62 A , there exists a number n  0 such that for any

L

with the op erations of function comp osition and inver-

R

word w 2P(L ) of length greater then or equal to n,

1 1

1

sion, thus (F  F ) = F  F for any F ;F 2F.

i j i j

j i

the escap e tra jectory Tr(Q; w ) is not entirely included

Consequently, the following equalities are true for any

in C . Let D denote the distance b etween p oint Q and

?

word w = a a :::a 2 V :

1 2 n

the attractor A , and r b e the largest Lipschitz con-

L max

stant found among the transformations F 2 F . Since

~ ~

h(w ) = h(a a :::a )

1 2 n

D > 0 and r < 1, there exists a number n  0

max

~ ~ ~

= h(a )  h(a )  :::  h(a )

1 2 n

n

< D . Consider an arbitrary word such that 2Rr

max

1 1 1

R R

= (h(a ))  (h(a ))  :::  (h(a ))

1 2 n

w 2P(L ) with length(w )  n,andletwy 2 L ,or

1

= (h(a )  :::  h(a )  h(a ))

n 2 1

2

Strictly sp eaking, there exists a word y 2 L such that

1 R 1

= (h(a :::a a )) =(h(w )) : 2 P  h(y ) is arbitrarily close to Q.

0

n 2 1

R R

y w 2 L. Then there exist p oints P ;P 2A such (Q; K ; m)= E

0 L

L2

8

R R

that P  h(y w )=P .We decomp ose the last equality

0

0 if Q 62 C or m =0;

>

>

0

>

byintro ducing an intermediate p oint P :

>

>

>

if Q 2C; m>0; and

>

<

maxfres(Q; a)g

R 0 0 R

~

a2K Q  h(a) 62 C for all a 2 K;

P  h(y )=P and P  h(w )=P:

0

>

>

>

~

>

1 + maxfE (Q  h(a);K==a; m 1)g

>

L2

It follows that

>

a2K

>

:

otherwise:

0 R ?

~

P  h(w )=P = P  h(y ) 2 P  h(V ) A:

0 0

These formulae can be used for any language K =

R

The distance b etween p oints P and Q is at least D , and

P (L ),provided that L has the pre x prop erty,asas-

the Lipschitz constant of the comp osite transformation

sumed in Theorem 2. The required op erations on lan-

R 1 n

~

h(w )=(h(w )) is at least r ,thus

guages are particularly simple if L is regular. It can b e

max

then sp eci ed using a nite-state automaton, which re-

n

~ ~

d(Q  h(w );P  h(w ))  d(Q; P )r

max

duces op erations on in nite languages to the op erations

n

on their nite representations. Details are given in the

 Dr > 2R:

max

following section.

0

~

Since P  h(w ) = P 2 A  C , and the distance of

0

~

Q  h(w ) from P is greater than the diameter of C , the

~

p oint Q  h(w ) must lie outside of C ,or

7. The application of nite automata

Tr(Q; w ) 6 C : 2

We start by recalling the necessary notions of the theory

of nite automata. For the original presentation see [19 ].

Theorem 2 reveals an analogy b etween the escap e tra jec-

tories of an LRIFS and an ordinary IFS. In b oth cases we

A nondeterministic nite-state (Rabin-Scott) automaton

nd in nitely long tra jectories con ned to A if the start-

is a quintuplet:

ing p oint Q b elongs to the attractor | resp ectively A

L

M = < V;S;s ;T;I >;

0

or A. For a p oint Q outside an attractor, all tra jectories

diverge to in nity as their length increases. However, in

where:

the case of an ordinary IFS we consider escap e tra jecto-

?

ries with resp ect to all p ossible words w 2 V , while in

 V is an alphab et,

the case of an LRIFS the words w are con ned to the

R

pre x closure K = P (L ).

 S is a nite set of states,

As a result of these observations, we can extend the

 s 2 S is a distinguished elementof S , called the

0

escap e-time formulae from Section 4 to LRIFS's as fol-

initial state,

lows:

 T  S is a distinguished subset of S , called the set

E (Q) = maxflength(w ):Tr(Q; w ) Cg;

L1

w 2K

of nal states,

E (Q)=

L2

 I  V  S  S is a state transition relation.

~

max flength(w ) + res(Q  h(w );a):Tr(Q; w ) Cg:

wa2K

We often write (a; s ) ! s instead of (a; s ;s ) 2 I .

i k i k

In the recursive counterparts of these functions, the key

Finite state automata are commonly represented as di-

~

issue is the selection of mappings h(a) that can b e ap-

rected graphs, with the no des corresp onding to states,

plied in each step. We use the derivatives of the language

and arcs representing transitions. The initial state is

K to nd the appropriate letters a at each level of recur-

pointed to by a short arrow. The nal states are dis-

sion. As previously, m limits the depth.

tinguished by double circles.

?

A word w = a a :::a 2 V is accepted by the

1 2 n

E (Q; K ; m)=

L1

automaton M if there exists a sequence of states

8

0 if Q 62 C or m =0;

>

s ;s ;s ;:::;s 2 S and s 2 T suchthat:

>

0 1 2 n1 n

<

~

(Q  h(a);K==a; m 1)g 1 + maxfE

L1

(a ;s ) ! s ; (a ;s ) ! s ; ; (a ;s ) ! s :

>

a2K

1 0 1 2 1 2 n n1 n

>

:

otherwise:

Thus, w is accepted by M if there exists a directed path

in the graph of M starting in the initial state s , ending 0

a b c F F−1 −1 1 F2 1 F2 −1 F2 F2 s s s 1 2 s1 F−1 2 1 F 1 I −1 I F F −1 −1 F 3 F F 1 F s0 −1 1 2 4 3 F F4 I 2 F4 I s −1 3 s4 s3 F4 s4 F −1 −1 3 F F4 F F−1 F

3 3 3 4

Figure 5: (a) The automaton M de ning the language L , (b) the attractor of the LRIFS I , and (c) the

1 1 1

RP R

automaton M de ning the language K = P (L )

1

1 1

in some nal state s , and lab eled with the consecutive E (Q; s ;m)=

n i

M 1

8

letters of w . The set of all words accepted by an au-

0 if Q 62 C or m =0;

>

>

<

tomaton M is called the language accepted by M, and

~

1+ max fE (Q  h(a);s ;m 1)g

j

M 1

denoted by L(M).

>

(a;s ;s )2I

i j

>

:

It is known that the mirror image of the language L(M)

otherwise:

is accepted by the automaton

(Q; s ;m)= E

i

M 2

R 0 0 R

8

M = hV; S [fs g;s ; fs g;I i;

0

0 0

0 if Q 62 C or m =0;

>

>

>

>

>

R

>

where I =

if Q 2C; m>0; and

>

>

>

~

<

max fres(Q; a)g

Q  h(a) 62 C

0

(a;s ;s )2I

i j

f(; s ;s ): s 2 T g[ f(a; s ;s ):(a; s ;s ) 2 I g:

k k j i i j

0

for all (a; s ;s ) 2 I;

i j

>

>

>

>

R

>

~

(Q  h(a);s ;m 1)g 1+ max fE

Thus, the automaton M is obtained from M by: >

j

M 2

>

>

(a;s ;s )2I

i j

>

:

otherwise:

0

 creating a new initial state s 62 S ,

0

The evaluation of functions E and E starts with

0

M 1 M 2

 creating transitions lab eled  from s to all nal

0

s = s . The equivalence of the formulae for E and

i 0

L1

states of M,

E ,aswell as E and E , can b e proved by induc-

M 1 L2 M 2

RP

tion on the maximum path length in M .

 reversing the directions of all other transitions,

R

Example 1. The following LRIFS I = hX; F ;V ;

 making s the unique nal state of M .

1 1 1

0

h ;L i was describ ed by Berstel and Ab dallah [6 ]. It is

1 1

Given an automaton M de ning a language L, the pre-

assumed that:

R RP

x closure P (L ) is accepted by the automaton M

R

obtained from M by making all its states nal.

 X is the plane,

Consider an LRIFS I = hX; F ;V;h;Li,where L is ac-

 F consists of four transformations:

1

cepted by a given nite automaton M. Using the metho d

RP

given ab ove, we can construct the automaton M =

F = s(0:5)  t(0:0; 0:5);

R

1

hV; S; s ;S;Ii that accepts the language K = P (L ).

0

F = s(0:5)  t(0:5; 0:5);

2

Aword w b elongs to K if and only if there exists a path

F = s(0:5);

RP

3

in M starting in s and lab eled with the consecu-

0

F = s(0:5)  t(0:5; 0:0);

4

tive letters of w . Thus, the recursive computation of the

derivatives of K , needed to evaluate functions E and

L1

E , can be replaced by the recursive construction of

 V = fF ;F ;F ;F g ,

L2

1 1 2 3 4

RP

paths in M , starting is s . This leads to the follow-

0

ing recursive de nitions:  h (F )=F for i =1; 2; 3; 4.

1 i i b a F2 F4 F s1 2 s2

F 1 F F 1 3 F2 F4

F4 s s 3 F 4 3 F F

1 3

Figure 6: (a) The automaton M de ning the language L , and (b) the attractor of the LRIFS I

2 2 2

The language L is de ned using the nite automaton The automaton M de ning L and the corresp onding

1 3 3

M shown in Figure 5a, and the corresp onding attrac- attractor are shown in Figure 7. The escap e time func-

1

tor is given in Figure 5b. The automaton de ning the tion is visualized in Plate 3.

R

language K = P (L ) is shown in Figure 5c, with the

1

1

transitions lab eled using the inverse transformations of

8. Conclusions

F . The lab el I indicates the identity transformation,

1

RP

. Plate 1 (left) asso ciated with the -transitions of M

1

This pap er presents metho ds for computing the escap e-

visualizes the escap e time function computed with a re-

time functions of language-restricted iterated function

cursion depth limit m =20, using a b ounding circle C

systems. The LRIFS's generalize the ordinary IFS's

with radius R = 5. The escap e time values are inter-

by imp osing restrictions on the applicable sequences of

preted as indices to a color map, arbitrarily divided into

transformations. The escap e-time functions can b e com-

several ramps. Plate 1 (right) presents the same function

puted for any set of sequences constituting a pre x-

as a height eld.

extensible formal language L. The computation of the

Example 2. The LRIFS I considered in this exam-

2

R

escap e time involves nding the mirror image L , deter-

ple was describ ed byVrscay[20]. It uses the same set of

R

mining the pre x language K = P (L ), and calculating

transformations F and the lab eling function h as I ,but

1

its derivatives. These op erations can be p erformed in

the language L is di erent. The automaton M de n-

2 2

a simple way if L is regular, using a sp eci cation of L

ing L and the resulting attractor are shown in Figure 6.

2

by a nite automaton. All examples considered in this

The escap e time function is presented in Plate 2.

pap er refer to this case. It is an op en problem whether

Example 3. The LRIFS I , taken from [16 ], describ es

3

non-regular languages can yield other attractors and vi-

a leaf-like structure with the alternating and opp osite

sualizations.

branches. The set of transformations is sp eci ed b elow:

One could raise a question, whether this pap er applies

computer graphics to visualize an imp ortant mathemat-

F = s(0:5)  t(0:002; 0)

1

ical concept, or whether it merely employs mathemat-

F = s(0:5)  t(0:002; 0)

2

ics to create images for the sakeoftheir visual app eal.

F = s(0:5)  t(0:002; 0:13)

3

Our motivation falls in b oth areas | wewanted to ex-

F = s(0:5)  t(0:002; 0:13)

4

tend the mathematical concept of escap e-time functions

F = s(0:42)  r (45)

5

to LRIFS's, realizing that it is primarily used for image

F = s(0:2)  r (90)  t(0:05; 0:05)

6

synthesis. In addition, we found that the well-established

F = s(0:2)  t(0:05; 0:05)

7

theory of automata and formal languages had unexp ected

F = t(0:3; 0:3)  s(0:74)  t(0:3; 0:3)

8

applications in computer graphics.

F = s(0:37)  r (45)  t(0; 0:14)

9

F = s(0:172)  r (90)  t(0:05; 0:19)

10

F = s(0:172)  t(0:05; 0:19)

11

F = t(0:265; 0:405)  s(0:74)  t(0:265; 0:405)

12

F = t(0; 1)  s(0:74)  t(0; 1) 13

a b F 13

s3 F , F F,F 67 10 11

F F 13 13 F s s F 8 2 4 12 F 13

F , F , F F ,,F F 5 67 9 10 11

s1

F , F , F , F

1 2 3 4

Figure 7: (a) The automaton M de ning the language L , and (b) the attractor of the LRIFS I

3 3 3

E (z )

1

App endix: Justi cation of the logarithmic Consider p oint Z = zc . By representing E (z ) as

2

3

formula for res(Z; a): asumE (z )+res(Z ),we obtain :

1

E (z )+res(Z ) res(Z )

1

kzc k = kZc k = R:

The continuity of the escap e function can also b e main-

1

Note that c = Zc=Z = F (Z )=Z , and take logarithms

tained by residual terms other than that given byFor-

of b oth sides of the previous equation:

mula 1, for example:

1

log kZ k +res(Z )(log kF (Z )klog kZ k)=logR:

8

R kZ k

if Z 2C and

>

<

~

Consequently,

0

~

Z  h(a) 62 C;

kZ  h(a)kkZ k

res (Z; a)=

>

:

log R log kZ k

otherwise:

0

: res(Z )=

1

log kF (Z )klog kZ k

In order to explain the advantages of Formula 1, let us

Although the ab ove reasoning applies to a particular IFS,

consider an IFS consisting of a single complex function

it justi es the use of Function 1 also in other cases. In

F (z )=z=c. By de nition, F (z ) is a contraction, thus

general, the distance b etween the origin of circle C and

jcj > 1. Given a circle C with radius R and center O

consecutive p oints in an escap e tra jectory tends to grow

in the origin of the co ordinate system, the integer-valued

exp onentially for large distance values. Consequently,

escap e-time function E (z ) is equal to:

1

Formula 1 minimizes rst-order discontinuities in the

n

escap e-time function, yielding visually pleasing graphi-

E (z ) = maxfn 2N : kzc kR g:

1

cal representations.

The symbol N represents the set of natural numb ers (in-

cluding zero), and the mo dule of a complex number is

n n

Acknowledgements

identi ed with its norm, jzc j = kzc k. Acontinuous

(and in nitely di erentiable) extension of function E (z )

1

Wewould like to thank Dr. Dietmar Saup e for the ini-

is:

tial discussions of the concepts presented in this pap er,

+ u

E (z ) = maxfu 2R : kzc kR g;

2

the detailed comments of the manuscript, and for pro-

+

viding us with the program for rendering height elds.

where R is the set of nonnegative real numb ers. Obvi-

ously, the value E (z ) satis es the equation:

3

2

There is no need for sp ecifying the second argumentto

the function res, as the IFS under consideration consists of a

E (z )

2

kzc k = R: single transformation.

[12] J. E. Hutchinson. Fractals and self-similarity. Indi- This researchwas sp onsored by an op erating grantanda

ana University Journal of Mathematics, 30(5):713{ graduate scholarship from the Natural Sciences and En-

747, 1981. gineering Research Council of Canada. The images were

generated using facilities of the University of Calgary and

[13] B. B. Mandelbrot. The fractal geometry of nature.

the University of Regina.

W. H. Freeman, San Francisco, 1982.

[14] H.-O. Peitgen and P.H.Richter, editors. The Beauty

References

of Fractals. Springer-Verlag, Heidelb erg, 1986.

[1] Ch. Bandt. Self-similar sets I I I. Constructions with

[15] H.-O. Peitgen and D. Saup e, editors. The Scienceof

so c systems. Monatsh. Math, 108:89{102, 1989.

Fractal Images. Springer-Verlag, New York, 1988.

[2] M. F. Barnsley. Fractals Everywhere. Academic

[16] P. Prusinkiewicz and M. Hammel. Automata, lan-

Press, San Diego, 1988.

guages, and iterated function systems. In J. C. Hart

and F. K. Musgrave, editors, Fractal Modeling in

[3] M. F. Barnsley, J. H. Elton, and D. P. Hardin. Re-

3D Computer Graphics and Imagery, pages 115{143.

current iterated function systems. Constructive Ap-

ACM SIGGRAPH, 1991. Course Notes C14.

proximation, 5:3{31, 1989.

[17] P. Prusinkiewicz and A. Lindenmayer. The algorith-

[4] M. F. Barnsley, A. Jacquin, F. Malassenet,

mic beauty of plants. Springer-Verlag, New York,

L. Reuter, and A. D. Sloan. Harnessing chaos for

1990. With J. S. Hanan, F. D. Fracchia, D. R.

image synthesis. Pro ceedings of SIGGRAPH '88

Fowler, M. J. M. de Bo er, and L. Mercer.

(Atlanta, Georgia, August 1-5, 1988). In Computer

Graphics, 22, 4 (July 1988), pages 131{140, ACM

[18] P. Prusinkiewicz and G. Sandness. Ko ch curves as

SIGGRAPH, New York, 1988.

attractors and rep ellers. IEEE Computer Graphics

and Applications, 8(6):26{40, Novemb er 1988.

[5] M. A. Berger. Images generated by orbits of 2-D

Markovchains. Chance, 2(2):18{28, 1989.

[19] M. O. Rabin and D. Scott. Finite automata and

their decision problems. IBM J. Res. Develop.,

[6] J. Berstel and A. Nait Ab dallah. Tetrarbres engen-

3:114{125, 1959.

drees par des automates nis. Technical Rep ort 89-7,

Lab oratoire Informatique Theorique et Programma-

[20] E. R. Vrscay. Iterated function systems: Theory,ap-

tion, UniversiteP. et M. Curie, 1989.

plications and the inverse problem. In Proceedings

of the NATO Advanced Study Institute on Fractal

[7] K. Culik II and S. Dub e. Ane automata and

Geometry held in Montreal, July 1989. Kluwer Aca-

related techniques for generation of complex im-

demic Pulishers, 1990.

ages. Manuscript, Universityof South Carolina in

Columbia.

[21] T. E. Womack. Linear and Markov iterated func-

tion systems in fractal geometry. Master's thesis,

[8] K. Culik II and S. Dub e. Balancing order and

Virginia Polytechnic Institute and State University,

chaos in image generation. Manuscript, University

Blacksburg, Virginia, 1989.

of South Carolina in Columbia.

[9] J.C. Hart. The ob ject instancing paradigm for linear

fractal mo deling. In Graphics Interface '92, pages

224{231. CIPS, 1992.

[10] J.C. Hart and T.A. DeFanti. Ecient antialiased

rendering of 3-d linear fractals. Pro ceedings of SIG-

GRAPH '91 (Las Vegas, Nevada, July 28 { August

2, 1991). In Computer Graphics, 25, 4 (July 1991),

pages 91{100, ACM SIGGRAPH, New York, 1991.

[11] D. Hepting, P. Prusinkiewicz, and D. Saup e. Ren-

dering metho ds for iterated function systems. In

Fractals in the Fundamental and AppliedSciences, pages 183{224. Elsevier, 1991.

Plate 1: The escap e time function for the attractor of the LRIFS I , shown using a color map and as a height eld

1

Plate 2: The escap e time function for the attractor of the LRIFS I , shown using a color map and as a height eld

2

Plate 3: The escap e time function for the attractor of the LRIFS I , shown using a color map and as a height eld 3