HAL Id: inria-00510143
https://hal.inria.fr/inria-00510143
Submitted on 17 Aug 2010
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Construction of fractals using formal languages and matrices of attractors
Joëlle Thollot, Eric Tosan
To cite this version:
Joëlle Thollot, Eric Tosan. Construction of fractals using formal languages and matrices of attractors.
Conference on Computational Graphics and Visualization Techniques (Compugraphics), 1993, Alvor,
Portugal. pp.74–81. �inria-00510143�
matrices of attractors
J. THOLLOT and E. TOSAN
LIGIA-LI SPI, b^at710
43,b oulevard du11Novembre1918
69622 VILLEURBANNE Cedex{ France
jthollot@ligia.univ-lyon1.fr
ABSTRACT
LRIFS's (Languag e-Restricted Iterated Function Systems) generalize the originaldeni-
tion of IFS's(Iterated FunctionSystems) by providingto ols for restrictingthe sequences
of applicable transformations.In this pap er, we study an approach of LRIFS's based on
matrices and graph theory. This enables us to generate a matrix which elements are
attractors.
Key Words: formal language, fractal, iterated function system, language-restricted it-
erated functionsystem,graph, automaton, matrix,diod.
INTRODUCTION
Fractal gemetry was rst intro duced by
Mandelbrot
[Mandelbrot83].
However, he
didn't give any precise denition of what a
fractal is. Thus, several dierent denitions
(notnecessarilyequivalent)and severalconc-
tructionmetho ds havesince b een tested.
The IFSmo del [
Barnsley88 ]
isparticularly
interesting due to it's rigourous formalism
and it's simplicity : a fractal is enco ded by
a nite numb er of contractive transforma-
tions. Several authors have tried to gen-
eralize this mo del. Equations systems [
Cu-
lik I I-Dub e93 ] [
Hart92 ]
and matrices [
Peilgen
et al.92]
are away to deneattractor vectors
(i.e. which elementsare non-empty compact
sets). Languag es acceptedby nite-state au-
tomatonareawaytodeneasubsetofanIFS
attractor [
Prusinkiewicz-Hammel92 ][
Berstel-
Morcrette89][Berstel-NaitAb dallah89].
We prop ose an approach based on matri-
cesofthe LRIFSmo del thatwillenableusto
constructamatrixofattractors. Wewillrst
to LRIFS and nite-state automaton. Then
we will show how to asso ciate a matrix to a
LRIFS. Finally, we will intro duce the deni-
tion of our matrix of attractors as well as a
constructionmetho d.
DEFINITIONS
LRIFS's intro duced by Prusinkiewicz and
Hammel
[Prusinkiewicz-Hammel92]
general-
ize
IFS'sintro ducedbyBarnsley
[Barnsley88].
Thus we will give the classical denitions of
anIFSandaLRIFS.Thenwewillintro ducea
new denitionofaLRIFS usinganite-state
automaton insteadof a language.
Iterated function systems
Let (X;d) b e a complete metric space. De-
note by H(X) the set of all non-empty com-
pacts of X. With the Hausdorff distance
d
H
, (H(X);d
H
) isa completemetric space.
An IFS isa set T = fT
1
;:::;T
N
g of con-
F : P(X) 0! P(X)
f 70! S
N
i=1 T
i
(f)=T f
isacontraction onH(X). Thusthisop erator
has a unique xedp oint :
f =F(f)=T
1
(f)[T
2
(f)[:::[T
N (f)
f is called the attractor of the IFS T and is
denoted by A(T).
Language-restricted iterated function
systems
Barnsleydenedan IFSasasetofN func-
tions. Prusinkiewicz denes an IFS as a
tuple of functions inorder to use formal lan-
guages. Thisenableshimtodenethealpha-
b etof contraction lab elsand alanguage over
this alphab et.
ALRIFSisaquadrupletI
L
= (T;6;h;L)
where:
T = (T
1
;:::;T
N
) is a tuple of contrac-
tions inX.
6 = f1;:::;Ng is an alphab et of con-
traction lab els.
h isa lab eling function,dened as :
h: 6 0! T
i 70! T
i
L6 3
is a language over6.
The function h is generalized to languages
over6 using the equations :
h()=T
1 T
2
:::T
k
if =
1
2 :::
k
h(L)=fh()=2Lg
h(6 3
)=fh()=26 3
g=T 3
L enables usto construct subsets of trans-
formationsandsubsetsofcompactsoftheIFS
attractor :
h(L)h(6 3
)
A
L
(p) =adh (h(L)(p))
A (p) A(T)=adh (h(6 3
)(p))
L
choice of the starting p oint p. However,
if the language L is p ostx extensible (i.e.
La L, the smallest setA
L
do es existand
can b e found as :
A
L
=adh (h(L)(p
0 ))
wherep
0
isthe xedp ointofthe transforma-
tion h(a).
Example : We use ane transformations of
R 2
2R 2
. The following notations are used :
T(a;b) isa translation by vector (a;b).
R(a)isarotationbyangleawithresp ect
to the originof the co ordinate system.
H(a)isa scalingwith resp ectto the ori-
gin of the co ordinate system.
The followinggure shows the attractor of
the IFS
T =fT
1
;T
2
;T
3
;T
4 g
where :
T
1
= H(0:5)
T
2
= T(0;0:5)H(0:5)
T
3
= T(0;1)R(=4)H(0:5)
T
4
= T(0;1)R(0=4)H(0:5)
The following gureshows the corresp ond-
ing attractor of the LRIFS
I
L
=(T;6;h;L)
where :
T = (T
1
;T
2
;T
3
;T
4 )
6 = f1;2;3;4g
L = f3;4g 3
f1;2g 3
The branchingstructure oftheattractor of
the LRIFS is clearly a subset of the original
attractor of the IFS.
Finiteautomaton
Inthe following, wewillonlyuse regularlan-
guages as generally admitted in the littera-
ture. We have chosen to work on the graph
of the automaton as these languages are ac-
cepted by nite automaton. Thus, we will
rst intro duce the denition of a nite au-
tomaton and of the graph of an automaton.
A nite automaton is aquintuplet
M=(Q;6;;Q
I
;Q
F )
where:
Qis a nite setof states.
6is an alphab et.
: Q26 ! P(Q) is a state transition
relation.
Q
I
Qis the set of initial states.
Q
F
Q is the setof nal states.
The language accepted by M is:
L(M)=f! 26 3
=9q2Q
I
:(q;!)Q
F g
where (q;a!) = ((q ;a);!) if a 2 6 and
! 2 6 3
.
Wecan representM as the directedgraph
G(M) = (Q;E) with no des representing
statesandarcsrepresentingtransitions. (The
initialandnalstateswillb edistinguishedby
short arrows ingures.)
So we will intro duce a novel denition of
a LRIFS : a LRIFS is given by a quadruplet
I =(T;6;h;M).
LRIFS
We prop ose a formalism based on matrices.
This is p ossible b ecause of the prop erties of
thespacesweworkon. Thus,wewillseewhat
are these prop erties and how to construct a
matrixasso ciatedwithaLRIFS.Moredetails
are givenin
[Thollot89].
Diods
We use the prop erties of diods in order to
construct matrices [
Gondran-Minoux86 ]
.
A diod isa triplet(D ;+;2) where :
D isasetasso ciated withtwoop erations
+ and 2.
+ iscommutativeand asso ciative.
2 is distributiveover +.
GivenadiodD onecanconstructandma-
nipulatevectorsandmatriceswhichelements
are in D . The following tripletsare diods:
(P(6 3
);[;3): the setoflanguages asso-
ciated with union and concatenation.
(P(h(6 3
));[;) : the set of transforma-
tionssetsasso ciatedwithunionandcom-
p osition.
Moreover, we have the following prop er-
ties:
h(L
1 [L
2
)=h(L
1
)[h(L
2 )
h(L
1 3L
2
)=h(L
1
)h(L
2 )
Thus, formulae over languages will b e the
same over sets of transformations.
Matrix associated with a graph of
automaton
In(P(6 3
);[;3),wecandenethe matrix as-
so ciated with agraph by:
A(M)=(A
ij )
A
ij
=fa=(q
i
;a;q
j
)2Eg
Example : Let M b e the automaton that
acceptsthe language L=f3;4g f1;2g . The
graphof Mis shown inFigure1.
0 q 1
q
1,2 3,4
1,2
Figure1
The matrix associated with Mis :
A(M)=
f3;4g f1;2g
; f1;2g
!
This matrix do es not give the initial and
nalstates. That'swhywedenetwovectors
I and F that are resp ectively the initial and
nal vectors.
I =(I
j )=
(
fg if q
j 2Q
I
; if q
j 62Q
I
F =(F
j )=
(
fg if q
j 2Q
F
; if q
j 62Q
F
Proposition : The set of words which
lenght is n acceptedbyM is:
L
n
=I t
A(M) n
F
Example : Let A b e the matrix :
A =
f3;4g n
S
i+j=n;j1 f3;4g
i
f1;2g j
; f1;2g
n
!
The language accepted by the automaton
shown inFigure 1is :
L
n
=
fg ;
A fg
fg
!
Matrix associated with a LRIFS
Usingthe matrixassociatedwith anautoma-
ton, wecan now construct the matrix asso ci-
ated witha LRIFS I
M
=(T;6;h;M) as :
H =h(A(M)) =(h(A ))
The elements of this matrix are the sets of
transformations asso ciated with the words of
A(M).
Example : The automaton shown in Fig-
ure 1 givesthe matrix :
H
M
=h
f3;4g f1;2g
; f1;2g
!
H
M
= fT
3
;T
4 g fT
1
;T
2 g
; fT
1
;T
2 g
!
MATRIX OF ATTRACTORS
We have shown in the previous section how
to asso ciate a matrix with a graph. We will
nowseehowtoasso ciateamatrixofattractor
with thismatrix. We willintro duce an appli-
cation relating a transformation to a p oint.
Then we willgeneralizeit to sets of transfor-
mations and to matrices which elements are
sets of transformations.
Case of one transformation
We use aconsequence of the xedp oint the-
orem :
Proposition : Let (X;d) b e a complete
metric space. Let S b e a set of contractive
transformations, stable for . Let T 2 S b e
acontractivetransformation. T has aunique
xedp oint c and wehave :
8p2X lim
n!1 T
n
(p) =c
Thus,we can dene an application by :
: S 0! X
T 70! c
We can also dene the following op erator :
T 1
= lim
n!1 T
n
=cst(c)
where cst(c)is the constant function.
This is a uniform convergence [
Gentil92 ]
.
Case of a set of transformations
Let H(S) b e the set of all non-empty com-
pacts of S. With the Hausdorff distance,
H
we have:
(T 0
) 1
= lim
n!1 (T
0
) n
=cst(A(T 0
))
(T 0
)=A(T 0
)
where T 0
= fT
!1
;:::;T
!
k
g 2 H(S) and
A(T 0
) isthe attractor ofthe IFST 0
.
Example : Consider the LRIFS
I
M
=(T;6;h;M)
where
T =fT
1
;:::T
8 g=I
1 [I
2
where :
I
1
=fT
1
;T
2
;T
3
;T
4 g
I
2
=fT
5
;T
6
;T
7
;T
8 g
T
1
= H(0:5)
T
2
= T(0;0:5)H(0:5)
T
3
= T(0;1)R(=4)H(0:5)
T
4
= T(0;1)R(0=4)H(0:5)
T
5
= H(1=3)
T
6
= T(1;0)R(=3)H(1=3)
T
7
= T(1;0)R(=3)T(1;0)
R(02=3)H(1=3)
T
8
= T(2;0)H(1=3)
6=f1;:::;8g
Mis givenby :
1 S 2
{ } S
q 1
0 q
where
S
1
=f1;2;3;4g
S
2
=f5;6;7;8g
Then we have:
(I
1 )=A
1
whereA
1
isthe attractor of I
1 .
(I
2 )=A
2
whereA isthe attractor of I .
sets of transformations
LetM(H(S))b ethe setofallmatriceswhich
elementsarecompacts of S. Let d
m
b e adis-
tance denedby :
d
m
(A;B)= max
1iN;1jN d
H (A
ij
;B
ij )
Then (M(H(S));d
m
) is a completemetric
space, and we have:
(H
M )
1
= lim
n!1 (H
M )
n
=cst((A
ij ))
(H
M
)=(A
ij )
Example :
h(A(M))=H
M
= I
1 fidg
; I
2
!
H k
M
= I
k
1 S
i+j=k 0 1 I
i
1 I
j
2
; I
k
2
!
H 1
M
= I
1
1 I
1
1 [I
3
1 I
1
2
; I
1
2
!
where I 3
1
= S
k I
k
1 .
And
(H
M )=
A
11 A
12
A
21 A
22
!
(H
M )=
A
1 A
1 [I
3
1 (A
2 )
; A
2
!
The elementsof (H
M
)will b e :
A
A
12
A
21
=;
A
22
VISUALIZATION
We use the Deterministic Algorithm in or-
der to visualize each element of the matrix
[
Barnsley88 ]
. Wewillnowgiveaconstruction
ofanattractorandavisualizationmetho dus-
ing the automaton.
Attractor associated with an
automaton
Prusinkiewicz has given a denition of an
attractorbasedonalanguage. Wegiveadef-
inition of an attractor based on an automa-
ton. This denition is a consequence of the
constructionof the matrixof attractors.
Denition : The attractor asso ciated with
I
M
=(T;6;h;M) is:
A
M
=
[
q
i 2Q
I
;q
j 2Q
F A
ij
A(T)
Thesetofalltransformationsasso ciatedwith
the words ofL(M) whichlenght is n is :
h(L
n
)=h(I t
A(M) n
F)=h(I) t
H n
M h(F)
Thenwehave :
lim
n!1 h(L
n
) = h(I) t
(lim
n!1 H
n
M )h(F)
= h(I) t
H 1
M h(F)
= h(I) t
(cst(A
ij
))h(F)
= S
q
i 2Q
I
;q
j 2Q
F cst(A
ij )
= cst(A
M )
Andso we get :
lim
n!1 h(L
n
)=cst(A
M )
Visualization method
Prusinkiewicz used the escap e-
timemetho dtovisualizetheattractorasso ci-
ated with a regular language [
Prusinkiewicz-
Hammel92].
Culik used the Chaos Game
Algorithmtovisualizetheattractorvectoras-
so ciated with an equations system
[Culik
I I-
Dub e93].
We use the Deterministic Algo-
rithm to visualize the elements of our ma-
trix of attractors (or an attractor asso ciated
withanautomaton). Thisalgorithmwas also
prop osed by Culikand used by Mocrette
and Berstel
[Berstel-Morcrette89][Berstel-
Nait
Ab dallah89].
Let f b e a compact (generally the unit
ball). Thenthesequence(f
n )
n2N
denedby:
f
n
=h(L
n )f
tends to the attractor
A
M
=
[
q
i 2Q
I
;q
j 2Q
F A
ij
WithQ
I
=figand Q
F
=fjg wehave :
f
n
=h(A n
M )
ij f
Thissequencetendstothe elementA
ij ofthe
Consider the LRIFS
I
M
=(T;6;h;M)
where
T =fT
1
;T
2
;T
3
;T
4
g where :
T
1
= H(0:5)
T
2
= T(0:5;0)H(0:5)
T
3
= T(0;0:5)H(0:5)
T
4
= T(0:5;0:5)R()H(0:5)
6=f1;:::;4g
We havechosen the matrix :
H
M
= fT
1
;T
4 g fT
2
;T
3 g
fT
2
;T
3
g fT
4 g
!
The matrix ofattractors corresp ondingis:
(H
M )=
A
11 A
12
A
21 A
22
!
The following gures give the elements of
(H
M ) :
A =A
A
21
=A
22
CONCLUSION
One can dene a matrix of attractors as a
limitofaserieofmatriceswhichelementsare
setsoftransformations. Givenamatrixofat-
tractors, one can dene subsets of attractors
asso ciated witha nite automaton. This is a
way to combine attractors, by comp osing el-
ementsof the matrix,yielding an interesting
approach.
However, further studies are needed in or-
der to :
Establish relationsb etweenthe dierent
attractors.
Developgeneralvisualization algorithms
of these attractors.
Classify the attractors using matricesof
languages.
Establishsome\rules"forcomp osingat-
tractors.
References
Barnsley, M.F. 1988. Fractal Everywhere.
Academic press, INC.
Berstel,J.,Morcrette,M.1989.Compactrep-
resentation of patterns by nite automata.
In Proceedings of Pixim,pages 387{395 .
Berstel, J., Nait Ab dallah, A. 1989. Te-
trarbres engendrespar des automatesnis.
Langages et algorithmes du graphique, Bi-
gre n
61-62.
and chaos in image generation. Computer
& Graphics,17(4), pp. 465{48 6.
Gentil, C. 1992. Les Fractales en Synthese
d'Images: leModele IFS. PhDthesis,Uni-
versite ClaudeBernard LYON 1,France.
Gondran, M., Minoux, M. 1986. Graphes et
algorithmes. Editions Eyrolles.
Hart, J. 1992 . The object instancing
paradigm for linear fractal mo deling. In
Proceedings of GraphicsInterface'92.
Mandelbrot, B.B. 1983. The Fractal Geome-
tryof Nature. W.H.Freemanand Co,New
York.
Peilgen, H.O., Jurgens, H., Saup e, D. 1992.
Enco ding images by simple transforma-
tions. In Fractals ForThe Classroom, New
York.
Prusinkiewicz,
P., Hammel, M.S. 1992. Escap e-time vi-
sualization metho d for language-restricted
iterated function systems. In Proceedings
of GraphicsInterface'92.
Thollot, J. 1989. Langag es formels et frac-
tales. Master's thesis, Universite Claude
BernardLYON1,France.Rapp ortdeDEA
\Informatiquefondamentale".