Ratonal Interpolants wt Tenson Parameters Gulo Cascola and Luca Roman Abstract. In ts paper we present a NURBS verson of te ratonal nterpolatng splne wt tenson ntroduced n [2], and we extend our proposal to te rectangular topology case. In partcular we present some ratonal nterpolatng tecnques tat enable us to reconstruct sape-preservng bvarate NURBS and allow us to nteractvely modfy te resultng surface by a set of tenson parameters. 1. Introducton Lookng at te story of CAGD n ndustry, t appears tat te need for compatble formats to excange data among dfferent systems led to te ntroducton of NURBS representaton, wc s even today, te current ndustry standard. However, even f NURBS s te most mportant entty n ndustral applcatons, n all commercal software packages te wegts are not used wen approxmatng or nterpolatng wt NURBS. Ts s because te desred range of values tat tey sould attan s rater restrctve (wegts sould be postve, bounded away from zero and also ave a reasonable upper bound n standard form). However, te man reason for te lmted use of nterpolatng NURBS s tat treatng wegts and control ponts as unknowns mmedately requres te soluton of a nonlnear problem. Terefore, te lterature s extremely poor n te feld of ratonal nterpolaton, snce very few autors ave tred to face all te dffcultes tat arse. Furtermore, as NURBS representaton can only be used to a very lmted extent for actual modellng purposes, te only excepton mgt be to style an applcaton were te wegts are used as farng or sculptng parameters. Tese consderatons motvated te researc reported n ts paper, were we propose a unvarate/bvarate nterpolatng NURBS, wose wegts are used as tenson parameters. Te unvarate form s te NURBS verson of te ratonal nterpolatng splne wt tenson orgnally proposed n [2] and [3] n order to mprove classcal polynomal tenson metods. In fact, wle te most famous nterpolatng splnes wt tenson, te so-called ν-splnes [5,6], are lmted to te parametrc case, our proposal works effcently bot n non-parametrc and parametrc cases. However, as our am s smply to underlne te possblty of applyng an
42 G.Cascola and L.Roman nterpolatng metod wt tenson propertes to non-parametrc sets of ponts, we wll lmt our attenton to te scalar formulaton only. In te same way, wen we present te extenson of ts proposal to te bvarate case, we address our attenton to non-parametrc ratonal nterpolatng tecnques of a rectangular set of ponts, wle stressng tat, n comparson to te few oter tenson metods proposed up to now, our soluton s gly flexble for geometrc modellng purposes and can be mplemented n a NURBS-based CAD system wt a really low computatonal cost. 2. Pecewse Ratonal Cubc Interpolant wt Tenson Defnton 1. Let (x, F ), = 0,..., N (wt x 0 < x 1 <... < x N ) be nterpolatng ponts and let D, = 0,..., N, denote frst dervatve values defned at te knots x. Ten a pecewse ratonal cubc nterpolatng functon c(x) C 1 [x 0,x N ] s defned for x [x, x +1 ], = 0,..., N 1, by te followng expresson c (x) = F R 0,3(x) + G R 1,3(x) + H R 2,3(x) + F +1 R 3,3(x) (1) were G := F + D 3w, H := F +1 D +1 3 λ j B j,3 (x) 3w (wt = x +1 x ) and Rj,3 (x) = j = 0,..., 3 are te ratonal bass functons (x), k=0 λ k B k,3 defned va te postve wegts λ 0 = λ 3 := 1, λ 1 = λ 2 := w and te cubc Bernsten polynomals Bj,3 (x), j = 0,..., 3. Here w s a tenson parameter for te sngle pece c (x),.e., f w, c (x) converges unformly to te lnear nterpolant on [x, x +1 ]. Addtonally, wen all te tenson parameters w, = 0,..., N 1, are ncreased, te ratonal splne c(x) converges unformly to a C 1 pecewse lnear nterpolant; tese pecewse ratonal cubc Bézer functons can be represented as NURBS, tat s on a sngle knot partton wt trple knots, and n te specal case of equal tenson parameters, wt double knots. Note tat, assumng te dervatve values D, = 1,..., N 1, to be degrees of freedom, and computng tem by te mposton of C 2 -contnuty condtons, c(x) C[x 2 0,x N ], see [2,3]. Remark 1. In te parametrc formulaton, ts proposal as te fundamental property tat te curve parameterzaton s good for any coce of te tenson parameters, as tese nfluence bot bass functons and control ponts. Now, wrtng (1) n te equvalent form c (x) = F ϕ 0,3(x) + D ϕ 1,3(x) + D +1 ϕ 2,3(x) + F +1 ϕ 3,3(x), (2)
Ratonal Interpolants wt Tenson 43 we can see c (x) as te ratonal cubc Hermte nterpolant, were ϕ 0,3(x) = R0,3(x) + R1,3(x), ϕ 1,3(x) = 3w R1,3(x) ϕ 2,3(x) = 3w R2,3(x), ϕ 3,3(x) = R2,3(x) + R3,3(x) are ratonal cubc Hermte bass functons. Wen w = 1, Rj,3 (x) j = 0,..., 3 become te cubc Bernsten polynomals Bj,3 (x) j = 0,..., 3, ϕ j,3 (x) j = 0,..., 3 become te cubc Hermte bass functons, and c(x) te well-known pecewse cubc Hermte nterpolant. Te latter represents te only tenson metod mplemented n commercal modellng systems. But, wle t requres te cangng of te modulus of te dervatves assgned at te gven nterpolatng ponts n order to aceve tenson effects on te resultng curve, te ratonal pecewse cubc Hermte nterpolatng tecnque we propose allows local/global tenson effects, wtout cangng te gven data set. 3. Bvarate Ratonal Interpolatng Functons wt Tenson In ts secton we ntroduce some metods tat allow us to reconstruct te sngle-valued surface nterpolant of a gven rectangular set of ponts and to modfy te resultng sape, eter locally or globally, usng te so-called tenson parameters. 3.1. Composton of bcubc partally blended tenson patces Te frst metod we present s a transfnte nterpolatng metod. After defnng a network of ratonal cubc Hermte nterpolatng functons, by assumng te values z,j, = 0,..., M, j = 0,..., N, and te frst dervatves f,j x, f y,j, = 0,., M, j = 0,..., N, correspondng to te rectangular grd ponts (x, y j ), = 0,..., M, j = 0,..., N (wt x 0 < x 1 <... < x M and y 0 < y 1 <... < y N ), we suggest blendng te four ntersectng ratonal cubcs formng te boundary of eac ndvdual patc usng te partally bcubc Coons tecnque (see [1]). Defnton 2. Te (, j) t bcubc partally blended Coons patc S,j (x, y), assumng values z,k and dervatves f,k x, f y,k, =, + 1, k = j, j + 1 correspondng to te four corners of te doman [x, x +1 ] [y j, y j+1 ], can be defned by te matrx form: (3) S,j (x, y) = [ 1 ϕ 0,3(x) ϕ 3,3(x) ] 0 S (x,yj ) S (x,yj+1 ) 1 S (x,y) S (x,y j ) S (x,y j+1 ) ϕ j 0,3 (y) (4) S (x+1,y) S (x+1,y j ) S (x+1,y j+1 ) ϕ j 3,3 (y) were w = w j = 1, j so tat ϕ s,3(x) and ϕ j s,3 (y), s = 0, 3 are te cubc Hermte blendng functons and S(x, y j ), S(x, y j+1 ), S(x, y), S(x +1, y)
44 G.Cascola and L.Roman denote, te ratonal cubcs wt tenson defned on te sdes of [x, x +1 ] [y j, y j+1 ] usng (2) wt F D D +1 F +1 w S(x, y j ) z,j f x,j f x +1,j z +1,j ω,j S(x, y j+1 ) z,j+1 f x,j+1 f x +1,j+1 z +1,j+1 ω,j+1 S(x, y) z,j f y,j f y,j+1 z,j+1 τ,j S(x +1, y) z +1,j f y +1,j f y +1,j+1 z +1,j+1 τ +1,j. Remark 2. Te composton S(x, y) of te partally blended Coons patces S,j (x, y), = 0,..., M 1, j = 0,..., N 1, nerts all te propertes of te network of boundary curves. Terefore t s caracterzed by a set of M (N +1) tenson parameters ω,j, = 0,..., M 1, j = 0,..., N, n te x drecton and by a set of (M + 1) N tenson parameters τ,j, = 0,..., M, j = 0,..., N 1 n te y drecton, wc ensure local/global tenson effects (see Fg. 1 and Fg. 2 left for examples of local tenson). Proposton 3. Te composton S(x, y) defned above s a C 1 -contnuous degree-seven pecewse ratonal surface wt sape-preservng propertes wen nterpolatng to monotonc and convex data sets. Proof: To prove tat S(x, y) s made of degree-seven ratonal patces, t s suffcent to make te boolean sum form (4) explct; te result mmedatly follows f we note tat a ratonal cubc wt tenson can be smplfed as a cubc over a quadratc (ts s due to te equalty of ts central wegts). Snce te boundary curves are C 1 -contnuous and te blendng functons satsfy te condtons (ϕ s,3) (x ) = (ϕ s,3) (x +1 ) = 0 and (ϕ j s,3 ) (y j ) = (ϕ j s,3 ) (y j+1 ) = 0, s = 0, 3, = 0,..., M 1, j = 0,..., N 1, contnuty of cross-boundary dervatves s automatcally satsfed. Furtermore, from te tenson and sape-preservng propertes of te network of boundary curves (proved n [2,3]), te correspondng tenson and sape-preservng propertes on te transfnte nterpolatng surface S(x, y) trvally follow. 3.2. Composton of bcubcally blended tenson patces Te bcubc partally blended Coons patc defned above s easy to use n a desgn envronment, snce only te four boundary curves are needed. However, a more flexble composte C 1 Coons surface can be developed f, togeter wt te boundary curves, te cross-boundary dervatves, nterpolatng to te tangent vectors and twst vectors assgned n te 2 2 grd ponts, are gven.
Ratonal Interpolants wt Tenson 45 Defnton 4. Te (, j) t bcubcally blended surface patc S,j (x, y), = 0,..., M 1, j = 0,..., N 1, assumng te values z,k and te dervatves f,k x, f y,k, f xy,k, n te 2 2 grd ponts (x, y k ), =, + 1, k = j, j + 1, can be defned by te matrx form: S,j (x, y) = [ 1 ϕ 0,3(x) ϕ 3,3(x) ϕ 1,3(x) ϕ 2,3(x) ] (5) 0 S (x,yj ) S (x,yj+1 ) S y (x,y j ) S y (x,y j+1 ) 1 S (x,y) S (x,y j ) S (x,y j+1 ) S y (x,y j ) S y (x,y j+1 ) ϕ j 0,3 (y) S (x+1,y) S (x+1,y j ) S (x+1,y j+1 ) S y (x +1,y j ) S y (x +1,y j+1 ) ϕ j 3,3 S(x x,y) S(x x,y j ) S(x x,y j+1 ) S xy (x,y j ) S xy (y), (x,y j+1 ) ϕ j S(x x +1,y) S(x x +1,y j ) S(x x +1,y j+1 ) S xy (x +1,y j ) S xy 1,3 (y) (x +1,y j+1 ) ϕ j 2,3 (y) were w = w j = 1, j and S(x, y j ), S(x, y j+1 ), S(x, y), S(x +1, y) denote te ratonal cubcs wt tenson defned above, nterpolatng to te corner data and tangent vectors, wle S y (x, y j ), S y (x, y j+1 ), S x (x, y), S x (x +1, y) denote te ratonal cubcs wt tenson nterpolatng to tangent and twst vectors, defned by (2) wt S y (x, y j ) f y,j f xy,j S y (x, y j+1 ) f y,j+1 f xy,j+1 S x (x, y) f x,j f xy,j S x (x +1, y) f x +1,j f xy +1,j F D D +1 F +1 w f xy +1,j f y +1,j ω,j f xy +1,j+1 f y +1,j+1 ω,j+1 f xy,j+1 f,j+1 x τ,j +1,j+1 f+1,j+1 x τ +1,j. f xy Remark 3. As asserted above, te composton S(x, y) of te bcubcally blended Coons patces S,j (x, y), = 0,..., M 1, j = 0,..., N 1 s a degree-seven pecewse ratonal surface, wc nerts all te propertes of te network of boundary curves (see Fg. 3 left, Fg. 4). In ts case, usng a network of C 2 boundary curves, we are able to obtan a C 2 surface. Remark 4. Wle n te prevous metod only two of te cubc Hermte bass functons are used (as te name bcubc partally blended suggests), ts tme, we ave to use all four cubc Hermte blendng functons n bot te coordnate drectons to obtan a patc tat ncorporates crossboundary dervatves as well. Excangng te used cubc Hermte blendng functons wt te four ratonal cubc Hermte polynomals defned n (3), and settng all tenson parameters n x and y drectons, respectvely equal to ŵ and w, we can aceve a global tenson control of te nterpolatng surface n te coordnate drectons (see Fg. 2 rgt).
46 G.Cascola and L.Roman 3.3. C 1 -joned tenson patces Te tensor-product surface of te ratonal cubcs wt tenson defned n Secton 2 s not useful because any one of te sape parameters controls te tenson on te entre correspondng strp of te surface. Te two Coons tecnques proposed n Sects. 3.1 and 3.2 can descrbe a muc rcer varety of nterpolatng NURBS surfaces tan do tensor-product surfaces and, addtonally, tey can ensure local tenson effects. However, tey cannot be represented n a bcubc degree NURBS form. Sarfraz s metod [7] (wc seems to be te only one presented n te lterature up to now) can provde an nterpolatory surface wt local tenson propertes, but t cannot be descrbed n a NURBS form because t uses a ratonal bcubc degree representaton wt functonal wegts. Moreover, ts computaton s too tme-consumng to be useful n a geometrc modellng system. Tese consderatons prompted us to look for an alternatve strategy wc could generate a ratonal Hermte nterpolatng C 1 surface, wt a bcubc degree NURBS representaton and a local tenson capablty. Snce a ratonal bcubc C 1 surface, nterpolatng to a gven set of (M + 1) (N + 1) data and dervatve values, can always be vewed as a collecton of M N ratonal C 1 Hermte bcubc patces tat are peced togeter, we are able to stretc a specfed patc of te orgnal surface and, usng te followng condtons, to keep te C 1 -contnuty wt te adjacent patces. Proposton 5. Let S,j (x, y) and S +1,j (x, y) be two degree-(m, n) ratonal Bézer patces respectvely, wt postve wegts {λ,j }, {λ+1,j } and control ponts {c,j }, {c+1,j } k = 0,..., m, l = 0,..., n, defned over te domans [x, x +1 ] [y j, y j+1 ] and [x +1, x +2 ] [y j, y j+1 ]. C 1 suffcent condtons between te two adjacent C 0 -contnuous ratonal patces S,j (x, y) and S +1,j (x, y), along te common boundary S,j (x +1, y), are λ +1,j = x +1 x λ,j k,n 1 + λ,j c +1,j = c,j k,n + x +1 x k,n λ,j 0,n λ,j k,n 1 λ +1,j ( x +1 λ,j x 0,n 1 + λ+1,j 0,1 ), k = 1,..., m, (c,j k,n c,j k,n 1 ), k = 0,..., m, (6) were x = x +1 x and λ +1,j 0,1 s an arbtrary postve constant. Proof: Usng te notaton proposed n [4], C 1 -contnuty between te ratonal patces S,j and S +1,j s equvalent to te condton (D x T +1,j (x, y)) x=x+1 = (D x T,j (x, y)) x=x+1 + σt,j (x +1, y), (7) were T,j (x, y), T +1,j (x, y) represent te omogeneus coordnate systems of te patces S,j (x, y), S +1,j (x, y), respectvely, and D x denotes te frst partal dervatve along te x drecton. Te constant σ s a free
Ratonal Interpolants wt Tenson 47 parameter snce we are consderng a ratonal C 1 -contnuty between te two patces S,j and S +1,j, wle te coeffcent of te term D x T,j s fxed equal to 1. Ts derves from consderng te patces n te classcal postonal contnuty C 0 (and not n te ratonal one), wc requres te equalty of wegts and control ponts on te common boundary curve: λ,j k,n = λ +1,j k,0, k = 0,..., m, c,j k,n = c +1,j k,0, k = 0,..., m. (8) Now, followng [4], f we derve te C 1 suffcent condtons between adjacent C 0 -contnuous rectangular ratonal Bézer patces, we obtan, for k = 0,..., m, te explct condtons 1 (λ +1,j x λ,j k,n ) = 1 (λ,j +1 x k,n λ,j k,n 1 ) + σλ,j k,n, 1 (λ +1,j x c +1,j λ,j k,n c,j k,n ) = 1 (λ,j +1 x k,n c,j k,n λ,j k,n 1 c,j k,n 1 ) + σλ,j k,n c,j k,n. Hence, assumng λ +1,j 0,1 = x +1 λ,j x 0,n 1 + (1 + x +1 + σ x x +1 )λ,j 0,n as a free parameter (snce t depends on σ) and, substtutng te resultng expresson for σ n te remanng prevous equatons, we fnd (6). Remark 5. Note tat wen λ,j = λ +1,j = 1 for k = 0,..., m, and l = 0,..., n, σ must be 0. In ts case te patces S,j and S +1,j are non ratonal and condtons (6) become classcal C 1 -contnuty condtons [1]. Snce our am s to be able to stretc a patc of a composton of M N ratonal C 1 Hermte bcubc patces, keepng te nterpolaton and te C 1 -contnuty wt all te patces around, from now on we wll consder condtons (6) wt m = n = 3. Addtonally, snce ratonal bcubc tensor-product surfaces are a well-known class of C 1 -contnuous NURBS surfaces, we focalze an example of our strategy on te Hermte nterpolatng surface S,j (x, y) = 3 3 k=0 l=0 c,j R k,3(x)r j l,3 (y), = 0,..., M 1 j = 0,..., N 1 wt {λ,j } =0,...,3 = [1, ν j, ν j, 1] T [1, µ, µ, 1]. Now, snce te tenson parameters µ, = 0,..., M 1 and ν j, j = 0,..., N 1 nfluence te entre strps [x, x +1 ] [y 0, y N ], = 0,..., M 1 and [x 0, x M ] [y j, y j+1 ], j = 0,..., N 1, respectvely, n order to obtan a local tenson control on a specfed ratonal Hermte patc S,j (x, y), we defne two new tenson parameters µ, ν j on te sdes of ts rectangular boundary. Ten we recompute te patc S,j (x, y) as a tensor-product, and explot te degree of freedom caracterzng condtons (6), to adjust te wegts and control ponts of te frst rng of egt patces contaned n te negbourood of
48 G.Cascola and L.Roman S,j, n order to mantan C 1 -contnuty. If we consder (for smplcty of presentaton) x = x +1, as, n our case, λ,j 0,3 = λ,j 3,3 = 1, C1 -contnuty condtons (6) assume te smplfed expressons λ +1,j = λ,j k,2 + λ,j k,3 (µ + λ +1,j 0,1 ), k = 1,..., 3, k,3 + λ,j k,2 (c,j k,3 c,j k,2 ), k = 0,..., 3, (9) c +1,j = c,j λ +1,j were λ +1,j 0,1 s taken as equal to µ + µ +1 µ. Ten, f after takng te boundary wegts λ +1,j = λ,j k,2 +λ,j k,3 (µ +µ +1 ), k = 1,..., 3, we repeat ts computaton n te drectons ( 1, j), (, j 1), (, j + 1), adjustng te wegt λ +1,j+1 1,1 as te product of λ +1,j 3,1 by λ,j+1 1,3, and te oter tree corner wegts λ 1,j+1 1,2, λ 1,j 1 2,2, λ +1,j 1 2,1 n te same way, te frst condton (9) s automatcally satsfed for eac patc around te (, j) t. Afterwards, by computng te correspondng control ponts accordng to te second condton (9), we are able to keep te C 1 -contnuty of te surface, even f we ave modfed te wegts of te (, j) t patc, causng a tenson on t (see Fg. 3 rgt). 4. Conclusons Te ratonal cubc nterpolatng metod proposed n [2,3] as been converted nto standard NURBS form and appled to obtan sape control on rectangular NURBS Hermte nterpolatory surfaces. Usng te tecnques descrbed, we ave obtaned a number of dfferent ways of acevng sape control on tese knds of surfaces, always mantanng C 1 -contnuty. In fact, comparng te followng fgures wt Fg. 1 left (wc was bult wt global values ω := ω,j = 1, j, τ := τ,j = 1, j), we can see tat t s possble to apply tenson: along a curve segment, causng te segment to tend to a stragt lne by ncreasng sape parameter ω,j for a specfed couple of ndces, j (Fg. 1 rgt, were ω 3,4 = 4); along a network curve, causng te wole curve to tend to a polygon by ncreasng sape parameters ω 0,j,..., ω M 1,j for one j {0,..., N} (Fg. 2 left sows ts for ω 0,4 = = ω 5,4 = 4); along x drecton (Fg. 2 rgt corresponds to te blendng tenson parameters ŵ = 4, w = 1); on a sngle patc. Ts s done by applyng bot nterval tensons at ts four sdes (Fg. 3 left represents te bcubcally blended tenson metod wt parameters (4,4), wle Fg. 3 rgt te ratonal bcubc tensor-product wt global parameters (2,2), were te C 1 -jon tecnque as been appled wt parameters µ 3 = ν 3 = 3); on te wole surface (Fg. 4 left sows ts for te global value ω := ω,j = 4,, j, τ := τ,j = 4, j);
Ratonal Interpolants wt Tenson 49 Fg. 1. left: no tenson - rgt: tenson along S([x 3, x 4 ], y 4 ). Fg. 2. left: tenson along S(x, y 4 ) - rgt: tenson along x drecton. Fg. 3. left: tenson on patc S 3,3 - rgt: tenson on patc S 3,3. everywere except on a specfed patc (Fg. 4 rgt sows ts usng a global tenson (4,4) and a local tenson (1,1) on patc S 3,3 ). 5. Future Work We ntend to extend tese metods to te parametrc case n order to be able to apply te ratonal G 1 -contnuty condtons (nstead of te C 1 - contnuty ntroduced n 3.3) wc wll gve us extra degrees of freedom.
50 G.Cascola and L.Roman Fg. 4. left: global tenson - rgt: global tenson except on patc S 3,3. Acknowledgments. Ts researc was supported by MURST, Cofn2000, and by Unversty of Bologna Funds for selected researc topcs. References 1. Farn, G., Curves and Surfaces for CAGD, Fft Edton, Academc Press 2002 2. Gregory, J. A., Sape preservng splne nterpolaton, Computer Aded Desgn 18 (1986), 53 57 3. Gregory, J. A., and M. Sarfraz, A ratonal cubc splne wt tenson, Computer Aded Geometrc Desgn 7 (1990), 1 13 4. Lu, D., GC 1 Contnuty condtons between two adjacent ratonal Bézer surface patces, Computer Aded Geometrc Desgn 7 (1990), 151 163 5. Nelson, G. M., Some pecewse polynomal alternatves to splnes under tenson, n Computer Aded Geometrc Desgn, R. E. Barnll, R. F. Resenfeld (ed.), Academc Press, 1974, 209 235 6. Nelson, G. M., Rectangular ν-splnes, IEEE Computer Grapcs & Applcatons, (feb. 1986), 35 40 7. Sarfraz, M., Desgnng of curves and surfaces usng ratonal cubcs, Computer & Grapcs 17 (1993), 529 538 Gulo Cascola Dep. of Matematcs - Unversty of Bologna P.zza d P. S.Donato 5, 40127 Bologna, Italy cascola@dm.unbo.t Luca Roman Dep. of Pure and Appled Matematcs - Unversty of Padova Va G. Belzon 7, 35131 Padova, Italy roman@dm.unbo.t