Design and Reconstruction of Fractal Surfaces

1 downloads 0 Views 3MB Size Report
tractors allows the definition of free form fractal shapes con- troled with a set of points. ..... [1] M.F. BARNSLEY. ,Fractal Everywhere. ,Academic press, INC, 1988.
Design and Reconstruction of Fractal Surfaces E. Tosan, E. Gu´erin and A. Baskurti LIGIM - EA 1899 - Computer Graphics, Image and Modeling Laboratory Claude Bernard University, Lyon, France Bˆat. 710 - 43, bd du 11 novembre 1918 - 69622 Villeurbanne Cedex Tel.: (33) 4.72.44.58.85 - Fax : (33) 4.72.43.13.12 E-mail: [et eguerin abaskurt]@ligim.univ-lyon1.fr March 15, 2002

Abstract

2 Model 2.1 IFS

A method for the design and reconstruction of rough surfaces is introduced. A fractal model based on projected IFS attractors allows the definition of free form fractal shapes controled with a set of points. This flexible model has good fitting properties for recovering surfaces. The approximation is formulated as a non-linear fitting problem and resolved using a modified L EVENBERG -M ARQUARDT minimisation method. The main applications are shape design, shape reconstruction and geometric data compression.

Introduced by BARNSLEY[1] in 1988, the IFS (Iterated Function Systems) model generates a geometrical shape with an iterative process. An IFS-based modeling system is defined by a triple  where:

is a complete metric space,







is a semigroup acting on points of  such that:    where  is a contractive operator.

An IFS  is a finite subset of :  "!#!#!$%&('*),+ with operators  . We note ./0 the set of non-empty compacts of  . The associated H UTCHINSON operator is:  1

1 Introduction

./2 3



1

165

4 

5

!#!#!

 &7'8)

1 !

This operator is contractive in the complete metric space Models that are capable of producing rough surfaces are #./0 " 9( , where :9 is the H AUSDORFF distance associmostly based on random processes. This is the reason why ated to  . Then it admits a fixed point, called attractor: they are not suitable for geometric design or approximation. @ 1E(FHG,I01 ;  7 = >#? C  ./0 J! In order to propose an efficient solution to this problem, the @B#m n{yvq

S

 S ) | ) J!!"! @ ,  | @ J !!"!

K

3.1 Interpolation

Q

i

where S  S )8!!"! S @ !"!! and |}r|")~!"!"!| @ !!"! G tively, the development of j and in base d .

2.3 Projected attractors

i

Ÿ

The main idea of our model is drawn from the formula of free form surfaces used in CAGD [16, 17] : €

G

o

i



G

i

and  ) : a ” ™›  ™") ; joining point abQJ r  f" r  fˆQJ œ are, respec-  ™") t )ˆ™› correspond to double binary developpement of i i i i ) ) ) :  W asfˆQ˜ W4 "™")   V  f"a"Q8 W_ )ˆ™› . ‰ ‰ ‰ Given a triple of points  ™š ,šž  ™") , the joining condition i (2) on L is equivalent to an interpolation constraint on : Curve endpoints are fixed points of

˜ ™ l

™ [œ˜ ™ ) † ž ¡

8) ™ l ž ¢8) ™ ) 



i

™ )[!3£

 

i

¥¦ ¤

i i

™   a V  )  W ž  ‰ ™ )b! %f V

This property is the base of the classical construction of fractal curves in the plane. Operators  - are taken in particular affine semigroups : similitudes [11] [13], shearings [1] [7] or i where ƒ  constitutes a grid of control points and  are blend- dilatations [2]. †… G i G   ing functions such that: „~j  acfˆ‡‰tŠ j: l In the general affine case, interpolation points are not suffiO ‚ f . cients for describe a fractal curve. Extra parameters allow to The way to obtain the same property for IFS attractors is to modulate curve aspects (rugosity, sharp transitions,...). j:

~



j:



O ‚

2

However, the fractal family of IFS-defined surfaces is ³ much wider. ´

¸8·B¶ §B

¶·¶ ³

¨› µ

µ

¸8·[¸

¶·b¸

´  ™

³

B ³ ´

´ ³

¸8·B¶ µ

³ ´

³

¶·¶

µ

µ

µ ³

´³ µ

©

´³

´

ª

¸8·[¸ µ

Figure 2: Fractal curves types.

µ

´ ³

µ

³

¶·b¸ µ

´

µ

´ ´

3.2 Aspect control

Figure 3: Subdivision scheme: boundaries and joinings.

The aspect of fractal curve depends of endpoints and joining point aspect. Corresponding patterns are duplicates with different scales along the curve. Endpoint aspect depends on the eigenvalues type of linear operators «  « ) associated with affine operators   % ) . Operators with real eigenvalues are conjugated dilatations. Corresponding endpoints tend to be aligned along a given direction (a “half-tangent”). An angle composed of two transformed half-tangents «R­ ¬ )« )s­ ¬ › appears at the joining point (figures 2b, 2c, 2d ). In particular cases, like the parabola, the two half-tangents are aligned (figure 2a). Operators with complex eigenvalues are conjugated similitudes. Corresponding endpoints have a spiral movement (right of figure 2e, left and right of figure 2f).

4.1 Joining condition The joining condition of the quadrangular patch is drawn … from the structure of as"i f‡ ‰ (see fig. 3). i iº¹ ® j" ® j"  j:,a: ›  Boundary curves i i i i7¹ i ° ° j:"f › j" ‘ asj š j" ‘ %f j are defined ® by IFS L ¹ » extracted from patch IFS  - » ¹ 6¼,½¾]kl>$m%nÀ¿ -  F ® F ° F ° F  a ›7¿ - M dretf š7¿ - œac ›7¿ - Mdretf  for F tas"!#!$!#dte†f . These boundary curves are drawn from the corresponding address functions: i »

j" WT » 

S

RxTVH¿ » 

S

% WTV#¿ X » Z !#!#! ¿ X » \ !#!#! š! i3Á

A necessary and sufficient condition for the function G j: ºÂTVNy to be defined and to be continuous is that the  Y-± T of the address function T join along their A joining condition must apply to the IFS to be sure the gen- components  borders -± Tc» [12] : erated attractor is a surface.

4 Surfaces representation

¹

Ÿ ® S ® S Classically, this joining condition is obtained by tensor  à ) T Y-± T ¹  W†-±  ° ° S S products of curves. This method, often used in CAGD, can be  à  Y-± T  W4Y- ) ± T  extended to IFS-defined surfaces. Therefore, it can be applied to the modeling of fractal surfaces [9, 8, 16, 17]. The function This equation system may be expressed as linear constraints i G i ® i ° G ® °  on Y-±  matrices. j  W^ j *¯^  is defined by IFS -± ² ^ - ¯¢ ^  .

3



4.2 Constraints

Ã

"Ã

l -±  ©"



Ã

. If one takes d ,   -± Å r©š- . Changing of a Å pretty be Å Å good Å choice would Å Å Å Now, suppose that each patch boundary is the embedding of a  Æ Ô " Æ Ô  system coordinates Û with ÛÜ© x allows to consider the Å Ý Å curve defined on a grid ^ ws"!$!#!#]+ in the corresponding general case. boundary of the patch control grid (see Fig. 1): In the case dx6Þ ( ß{uß control grid and Þ{uàÞ subdivision matrices) an IFS standard grid áâuá can be defined. o S S S Æ (3) A patch is determined by wireframe skeleton composed by T »  W†Ä T ^ »  WÂÅ T ^ » Æ  *Ä © » » ^ Æ p  bounding curves, joining lines and diagonal curves. The standard grid is defined by three families of points : The embeddings associated with¹ the grid boundaries are  ®  ®  °  ° Æ Æ Æ Æ

defined by: Ä ® © ^ Æ  © ±  6Ä ® © ^  © ± 6Ä ° © ^  boundary points (dimension Þ ) : ^   ^ )  ^   ^ ) which ¹ i i ¹ i i ¹ Æ Æ 4 Æ  Ç : È Ë É Ê ° ©  ± WÄ ©^ x© ± as"!#!#,Ì! Å define boundary curves : ®  ®  °  ° ; Let us denoteÅ L ^ »Í²  ^ - » Î-Np  ±ÐÏÐÏÐÏб &('*) the IFS that defines

joining points (dimension : ã )  Tc ^ » ; then Y-± matrices must satisfy the following embedding cä cä så så which define joining curves :     )  ) constraints [12]: i ä i i ¹ i ) ) T »

Ä »

T^ »

¼,½¾ Ä £

xÄ »

»

F

ÇÈ:É

 ^ -»

Y-± T

°

¹

°

à  4- ) ± T

Y-± £



° Ä

 -±  Ä £

°

¹

T^ °

¹

à  4- ) ±

 4  - à ) ± ®

The argument is also valid with L ^

¹

¹ 

®

L^

Ä

° Ä

°

L^

°

T^ ¹

-±

L^

 ææ

°

i

å i

å

¦

ä

!

 j" Ž

i ¤ææ

° 

±

¥

as"!$!#dte†f

The joining equations may be expressed as constraints on  and on boundary IFS L ^ » [12]: 

-

i

) j" Ž  j" W

i i

) j" W



-±



® R†  ±  )  Ó j  ~4*) i(¹ )‰ ) ‰ ‰ °   j" W† ±  ) ‰) ‰)   Ó j R† ‰ ‰ ‰ 

‰)

j 

‰ )

® j" W†  ± ) iܹ ® j R†*) ± i ° j" W48) ±  i(¹ ° j" W48) ±) ç

j" › i

±)

j š i

® j" ›

±)

° j ¡

Yç

Yè

è

diagonal points (dimension ã ) :   )    ) which define, with other points, diagonal curves : Ÿ i i i

ç j" Ž è j W

i

j:,j" ›

j:šeéj" ›!

(see Fig. 1).

The general description admits ޓu]êºÓ}ê2uã7Ó}ê0uãvtë:Þ real parameters. Practically, the points are taken in subspaces correspond5 Surfaces design ì  ing to parts of the control grid [5] : Æ ²Ä » ^ »Æ . Then a An IFS defined by dUud matrices -±  that satisfy the pre- local patch control is possible. If the points are defined in vious constraints is equivalent to a subdivision scheme char- planes, corresponding curves are equally in planes (figure 4). acterised by a grid of points (see Fig. 3). In this way, the If the points are defined in straightlines, corresponding curves classical process of point interpolation to build a fractal curve are segments or polylines. Surfaces possess sharp angles and in ѓ‰ [1] has been extended to fractal surfaces in ÑvÒ [8, 7, 15]. rock aspect (figure 1). The proposed grid is composed of 0dqÓ_f Ru0dqÓ_f ‚ points of ‹ corresponding to matrices columns :  -±  © Æ"Ô   ÃÆ ÃÔ 6 Surfaces reconstruction . ± The joining equations are satisfied:  G Å Å Given a sampled surface jš-,  ›í{-  ÑvÒ , the challenge is ¹ ¹  à   Ô Ã  Ô to determine the projected IFS model which provides a good -± Ä ° †- ) ± Ä ° -± Ä ® © ^ 4Y- ) ± Ä ® © ^ £ quality approximation of this surface. The approach is based  Ô Ã  Ô -± © ± 4Y- ) ± ©  ± £   on a non-linear fitting formalism. à ÃÔ Ã ÃÔ -

£ Å

Å

±

Å



) Ö ±

Å

-

Å(Õ

Å

6.1 Non linear fitting

However, embedding equations are expressed as restrictions on grid boundaries:

Let ív-  -Np  ±ÐÏÐÏÐÏα &Žî  p  ±ÐÏÐÏÐϱ & îÖ be a given surface to approximate. Considering the coefficients of the operators - and the  ¼›Ø × Ä ° Ä °  ^   ¼›Ø × Ä ° © ^ Ô Ä °  ^  © ^ Ô Õ – £ ° coordinates of the control grid as elements of a parame Ô Ô €*ð   ± ©  Ä °  ^  © ^ ter vector ï allows us to construct a family of functions £ –*ð ð   ° "ÃÔ defined by couples   .  ± ÃÔ Ä ° ^ £ The approximation problem consists in determining the Å Å  ° ‚ the distance between the where  ^ Æ Æ p  ±ÐÏÐÏб is a set of points of ‹Ú that characterise parameter vector ï that minimizes  € ð i °  ` í `      ›  í + and the function sampled surface : curve ^ . &Žî &Žî Å Ù   The points are transformed patch corners -± €*ð É%õ °

 -± © 





Å

-±

   Å Y-± © Å _

°

Å

Å







Å

-

Ã



Å

±

Å

 _-± ©

ïsñÎò"ó~ô



Å Å

4

ð ?2>$ö

Îí]



Figure 4: Patch with diagonal arcs; boundary arcs are paraboles. where: o

€ ð

Îíà

R -

Œ#Œ÷í 

-

 e

Figure 5: Top: natural surface (mountain near Dijon, France). Bottom: reconstruction.

F

€ ð 

ò d

ø ò Œ#Œ ‰ d

6.2 Solving the non-linear problem

The surface tabulation is a grid defined by [4, 5, 6] : F

€*ð

kl>#m%nà

F 

ø





 d

Àø ò V d ò

s"!!"!Yd

ò

The developments of quences of a : S  S )8!"!! i ð

 &

-

î 3 

d

ò

S

Our resolution method is based on the L EVENBERG -M AR QUARDT algorithm. This algorithm is a numerical resolution of the following fitting problem:

Ìø ò d ò

e†f . with infinite sea"QWW|{x|")V!!"!Î| ò abQË! and:

ò T{Î





F

e†f[+DuÌbas "!"!!sd and & î end & î

 î  &

–Di

S

) ,| ) !"!!›

S

ï ñÎò"ó ô

É%õ ð ?2>$ö

o ú Æ

û

d

ò

Àø ò W d

– ð

‰

p 

where vectors þ and ÿ are the fitting data, in our case : ò Æ Æ Ê d Ó4f ‰:Wû xac~ý  ! The fitting model is:

i

F

Æ

eüª8zï8ý

ò|Îò ›asa QJ

X:Zù%Z~!"!"!X î ù î T{ ac,a: Q˜ i X:Zù%Z~!"!"!X î ù î ac,a:

By choosing ac,a: 0©", , the surface tabulation may be generated computing only ƒ iterations without any loss of information: € ð

Æ

 X Z ù ZV!!"! X î ù î ©", €*ð

-

So, for a fixed number ƒ , the function §} & î  polynomial. Hence, so is the error function §{UÎí]

 & î €*ð

ª8zï8 F

Ê

W ò

Œ#Œ÷ív-



le

€8ð

F 

Æ



Æ ò

d ò

 ø ò Œ#Œ d

where Æ  Ê ? È d and Æ  Ê d . ø The L EVENBERG -M ARQUARDT method combines two types of approximation for minimizing the square distance. When is The first consists in a quadratic approximation. this fails, the method tries a simple linear approximation. . 5

These approximations are computed with the provided partial derivatives of the fitting model. In our case, they are numerically computed by a perturbation vector [3, 4]:  

with:

ª §:-

­

Nï8

ª8zïvÓ [ïs-



­

*e

ª*Nï8

­

[8] P. MASSOPUST. ,Fractal Functions, Fractal Surfaces and Wavelets. ,Academic Press, 1994. [9] Charles A. MICCHELLI and Hartmut PRAUTZSCH. ,Computing surfaces invariant under subdivision. ,Computer Aided Geometric Design, (4):321–328, 1987.







[ïs-~q ac!"!!c  ,ac  as"!"!!sa

[10] Hartmut PRAUTZSCH and Charles A. MICCHELLI. ,Computing curves invariant under halving. ,Computer Aided Geometric Design, (4):133–140, 1987.

.

-

[11] P. PRUSINKIEWICZ and G. SANDNESS. ,Koch curves as attractors and repellers. ,IEEE Computer Graphics & Applications, pages 27–40, novembre 1988.

7 Conclusion

We have presented a new approach for modeling and approx[12] Eric TOSAN. ,Surfaces fractales d´efinies par leurs imating rough objects. This method is based on a fractal bords. ,In L. Briard, N. Szafran, and B.Lacolle, editors, model named “projected IFS attractors”. This model is a Journ´ees “Courbes, surfaces et algorithmes”, Grenoparametric description which has the advantage of compactly ble, 15-17 Septembre 1999. describing the surface shape, making it useful for Geometric Modeling and Computer Graphics. The first results show that [13] Claude TRICOT. ,Courbes et dimension fractale. our description is an interesting approach to design or recon,Springer Verlag, 1993. struct rough objects. [14] C W A M van OVERVELD. ,Family of recursively defined curves ,related to the cubic B´ezier curve. ,Computer-Aided Design, 22(9):591–597, 1990. References [1] M.F. BARNSLEY. ,Fractal Everywhere. ,Academic [15] Heping XIE and Hongquan SUN. ,The study of Bivariate Fractal Interpolation Functions and Creation of press, INC, 1988. Fractal Interpolated Surfaces. ,Fractals, 5(4):625–634, 1997. [2] Serge DUBUC. ,Mod`eles de courbes irr´eguli`eres. ,In Dimensions Non Enti`eres et Applications. Masson, [16] Chems Eddine ZAIR and Eric TOSAN. ,Fractal mod1987. eling using free form techniques. ,Computer Graphics Forum, 15(3):269–278, August 1996. ,EUROGRAPH[3] E. GUERIN, E. TOSAN, and A. BASKURT. ,Fractal ICS’96 Conference issue. coding of shapes based on a Projected IFS Model. ,In IEEE Signal Processing Society, editor, Proceedings [17] Chems Eddine ZAIR and Eric TOSAN. ,Computer ICIP’2000, volume 2, pages 203–206, 10-13 SeptemAided Geometric Design with IFS techniques. ,In M M ber 2000. Novak and T G Dewey, editors, Fractals Frontiers, pages 443–452. World Scientific Publishing, April [4] E. GUERIN, E. TOSAN, and A. BASKURT. ,Frac1997. tal Approximation of Curves. ,Fractals, 9(1):95–103, March 2001. [5] E. GUERIN, E. TOSAN, and A. BASKURT. ,Fractal Approximation of Surfaces based on projected IFS attractors. ,In Proceedings of EUROGRAPHICS’2001, September 2001. ,Short presentation. [6] E. GUERIN, E. TOSAN, and A. BASKURT. ,Modeling and Approximation of Fractal Surfaces with projected IFS attractors. ,In M. M. Novak, editor, Emergent Nature, pages 203–304. World Scientific, 2002. [7] P. MASSOPUST. ,Fractal surfaces. ,Journal of Mathematical Analysis and Applications, (151):275–290, April 1990. 6