curvature continuous interpolation of curve meshes

22
COMPUTER AIDED GEOMETRIC DESIGN ELSEVIER Computer Aided Geometric Design 14 (1997) 169-190 Curvature continuous interpolation of curve meshes Xiuzi Ye Massachusetts Institute of Technology, Department of Ocean Engineering, Design Laboratory, Cambridge, MA 02139-4307, USA Received December 1995; revised March 1996 Abstract This paper presents a method for local construction of a curvature continuous (GC 2) piecewise polynomial surface which interpolates a given rectangular curvature continuous quintic curve mesh. First, we create a C 2 quintic basic curve mesh, which interpolates the same grid points, preserves the tangent slopes and curvatures but not derivative vectors at the grid points. After estimating twist and higher order mixed partial derivatives for each grid point, we generate locally the so-called C 2 biquintic basic patches, which serve to compute the first and second order cross-derivative functions of the final interpolation surface. In order to match the tangents and second order derivative vectors of the original boundary curves at the grid points, these basic patches are reparametrized by 5 x 3 and 3 x 5 functions, which lead to vector-valued first and second order cross-derivative functions of degrees 7 and 9 of the final surface patches, and eventually lead to a GC 2 piecewise polynomial surface of degree 9 x 9, which is then converted to a GC 2 B6zier composite surface. By arranging the surface patches in a chess-board fashion, the degrees of the final surface patches can be 9 x 5 and 5 x 9. An example for the construction of a GC 2 ship hull, together with its color-coded curvature maps, is given to illustrate the method. This method is attractive because the final surface has a much lower degree than other similar methods, it allows flexible local modification of the original curve mesh and local editing of the interpolation surface, and it is easily integrated into state-of-the-art geometric modeling systems. Keywords: CAD/CAM; Basic patches; B6zier patches; Curvature continuity; Reparametrizations; Compatibility conditions 1. Introduction There are many practical design situations in which surfaces are generated by interpo- lating some characteristic mesh curves which control the global geometry of surface. In these situations, the characteristic curves, because of their great influence on the shape 016%8396/971517.00 Copyright © 1997 Elsevier Science B.V. All rights reserved SSDI 0167-8396(96)00027-1

Upload: xiuzi-ye

Post on 02-Jul-2016

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Curvature continuous interpolation of curve meshes

COMPUTER AIDED

GEOMETRIC DESIGN

ELSEVIER Computer Aided Geometric Design 14 (1997) 169-190

Curvature continuous interpolation of curve meshes

Xiuzi Ye Massachusetts Institute of Technology, Department of Ocean Engineering, Design Laboratory, Cambridge,

MA 02139-4307, USA

Received December 1995; revised March 1996

Abstract

This paper presents a method for local construction of a curvature continuous (GC 2) piecewise polynomial surface which interpolates a given rectangular curvature continuous quintic curve mesh. First, we create a C 2 quintic basic curve mesh, which interpolates the same grid points, preserves the tangent slopes and curvatures but not derivative vectors at the grid points. After estimating twist and higher order mixed partial derivatives for each grid point, we generate locally the so-called C 2 biquintic basic patches, which serve to compute the first and second order cross-derivative functions of the final interpolation surface. In order to match the tangents and second order derivative vectors of the original boundary curves at the grid points, these basic patches are reparametrized by 5 x 3 and 3 x 5 functions, which lead to vector-valued first and second order cross-derivative functions of degrees 7 and 9 of the final surface patches, and eventually lead to a G C 2 piecewise polynomial surface of degree 9 x 9, which is then converted to a G C 2 B6zier composite surface. By arranging the surface patches in a chess-board fashion, the degrees of the final surface patches can be 9 x 5 and 5 x 9. An example for the construction of a G C 2 ship hull, together with its color-coded curvature maps, is given to illustrate the method. This method is attractive because the final surface has a much lower degree than other similar methods, i t allows flexible local modification of the original curve mesh and local editing of the interpolation surface, and it is easily integrated into state-of-the-art geometric modeling systems.

Keywords: CAD/CAM; Basic patches; B6zier patches; Curvature continuity; Reparametrizations; Compatibility conditions

1. Introduct ion

There are many practical design situations in which surfaces are generated by interpo- lating some characteristic mesh curves which control the global geometry of surface. In these situations, the characteristic curves, because of their great influence on the shape

016%8396/971517.00 Copyright © 1997 Elsevier Science B.V. All rights reserved SSDI 0167-8396(96)00027-1

Page 2: Curvature continuous interpolation of curve meshes

170 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

of thesurface, are carefully and individually designed from their physical constraints. Frequently, each characteristic curve has its own specific parametrization. It might also be faired before the surface is generated. Practical experience has shown that the resulting surfaces are likely to have aesthetic unsmoothness if the generated mesh curves are not of high quality. Also, it may not be possible to construct B-spline surfaces from such curve meshes because B-spline surfaces are mono-parametrized in each of the two parametric directions. In other words, all mesh curves in each parametric direction of a B-spline surface are constrained to each other by the parametrization. In order to construct con- tinuous surfaces from arbitrarily parametrized curve meshes, high degree surface patches have to be used.

In most applications tangent-plane continuity (GC l) of adjacent surface patches is mandatory, since a discontinuity of the tangent-planes is very obvious to human eyes, as well as causing rapid change of physical properties such as velocity of air or fluid flows on the surfaces. Curvature continuity ( G C 2) is highly desired in applications such as the car, airplane and ship industries. Although a discontinuity of surface curvature is not so sensitive aesthetically, it can have great influence on the physical performance of the objects.

Although the construction of G C 1 surfaces by interpolating curve meshes has been widely researched, see, e.g., (Chiyokura et al., 1983; Choi et al., 1993; Liu et al., 1994; Peters, 1990, 1991; Sarraga, 1987; Shirman and S6quin, 1990; Ye, 1994, 1995b; Ye and Nowacki, 1994), little work has been done on the construction of curvature continuous surfaces by interpolating curve meshes. The C 2 Gregory patches proposed in (Gregory, 1983) may be used for this purpose. They are patches with "compatibly corrected" rational functions for twist and higher order mixed partial derivatives. A C 2 Gregory patch is a rational patch of degree 13 x 13 with singularities at its four corners. A method using B6zier polynomial patches of degree 15 × 15 (or 5 x 15 and 15 x 5 if the surface patches are arranged carefully in a chess-board fashion) is developed in (Nowacki et al., 1992). These B6zier patches have compatible mixed partial derivative vectors at their corner points, and can easily be integrated into state-of-the-art geometric modeling systems. However, the degree of the surface patches is too high, which may cause problems such as numerical instability and long computation time.

In this paper we develop a new method for construction of G C 2 surfaces by inter- polating given G C 2 quintic curve meshes. It is an extension of the method in (Ye and Nowacki, 1994) for G C 1 interpolation of G C l cubic curve meshes. In the new method a C 2 quintic basic curve mesh which interpolates the grid points is generated first. This new curve mesh preserves the tangent slopes and curvature vectors but not derivative vectors of the original curve mesh at the grid points. After estimating a twist vector and higher order mixed partial derivative vectors for each grid point, quintic Hermite patches joining C 2 continuously along their common boundary curves are generated. These surface patches are called basic patches which are not stored in the computer. They serve to compute the vector-valued first and second order cross-derivative func- tions of the final interpolation surface. In order to match the tangents and second order derivative vectors of original boundary curves at the grid points, these basic patches are "reparametrized" by 5 x 3 and 3 x 5 functions. This leads to the vector-valued first and second order cross-derivative functions of degrees 7 and 9 of the final interpolation

Page 3: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 171

surface patches, respectively. It eventually leads to a GC 2 piecewise polynomial surface of degree 9 × 9. The final surface is converted to a GC 2 B6zier composite surface. An example for the construction of a GC 2 ship hull from given GC 2 curve mesh, together with its color-coded curvature maps, is given later to illustrate the method.

Differing from existing construction techniques using basic patches, only one basic patch, not four basic patches as in (Chiyokura and Kimura, 1983; Shirman and S6quin, 1990) is constructed for each final surface patch in this paper. Basic patches in this paper do not interpolate any mesh curves. They interpolate only the grid points, the so-called basic tangents, basic curvature vectors, basic twist vectors and higher order basic mixed partial derivative vectors at the grid points. The reason for this is that, by using the Gregory patches in (Chiyokura and Kimura, 1983; Shirman and S6quin, 1990), the vector-valued cross-derivative functions in the two parameter directions can be computed independently, whereas in the new method, they are inter-dependent through the compatibility of the twist and higher order mixed partial derivative vectors of the final surface patches. These compatibility requirements generally are global inter-patch relationships. They are essential for the final surface patches to be representable by standard polynomial surface patches. The new basic patch technique allows us to satisfy these compatibility requirements in a patch by patch fashion.

If the surface patches are carefully arranged in a chess-board fashion as in (Nowacki et al., 1992), and the basic curve meshes are generated accordingly, the degrees of the final surface patches can be 5 × 9 and 9 × 5. Generally, the new method produces surfaces with much lower degree (9 × 9) than other similar methods (13 × 13 in (Gregory, 1983) and 15 x 15 in (Nowacki et al., 1992)). It also provides flexibility in modifying the original curve mesh locally without destroying the curvature continuity of the interpolation surface and in editing the interpolation surface locally by adjusting the magnitudes of the tangents of the basic curve mesh. Because of its composite B6zier form, the final surface can be easily integrated into state-of-the-art geometric modeling systems.

2. Construction of the basic patches

As shown in Fig. 1, assume ti~at a curve mesh with mesh curves

{C~'(v), i = 0 , 1 , . . . , m } and {C~(u), j = 0 , 1 , . . . , n }

in the parameter u- and v-direction is given. Each mesh curve consists of quintic B6zier segments which join curvature continuously (GC2), but not necessarily C 2, at their common points called grid points. Let C~(v) be the jth B6zier segment of C~'(v), and C~j (u) be the ith B6zier segment of C~ (u). Denote Pij as the grid point where the four B6zier segments C~,j_ 1 (v), C~j(v), C~_l,j(u ) and C~(u) meet, i.e.,

Pij = C~,j_,(1) = C~(O) = C~_,,j(1) = C~(O)

( i = O , 1 , . . . , m ; j = O , 1 , . . . , n ) . (1)

Since the two B6zier segments C~,j_ 1 (v) and C~(v) are GC 2 at Pij, they have the same tangential direction and the same curvature vector at P~j. That is to say, there

Page 4: Curvature continuous interpolation of curve meshes

172 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

ci(.) c;+,~.)

(a) m

(P~j)TTrb ~ + r0 ~j Tb ~j

"dk/ /~[F +rl v v l~ U lJ 'I'~D U ,, ~v ,Z . , . . . v r O V , l ~ V

II II U U (Pl~flTrb~*rltj Tb u

(b)

Fig. 1. A curve mesh and its first and second order derivative vectors at the grid points.

exist a so-called basic tangent Ti~, a so-called basic curvature vector TT~, and four real coefficients p01'~, pl,~, and r 0 ~ , r l l~, such that

dCV_lj (1) du = PO~ Tbi3

d2C~- l,J (1) u 2 u rO~Tb~ (2) du 2 = (pOij) TTbij +

and that

dC~ (0) =pl~Tb~ du

Page 5: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 173

d2C~(O) - (p l~ )2TTb~ + r l ~ T b ~ (3) du 2

The basic tangent Tb~j and the basic curvature vector TTb~ are frequently taken as the first and second derivative vectors of one of the two segments C~,j_ 1 (v) and C~ (v) at Pij, respectively. In this case, either p0i~ = 1 and r0~j = 0, or pli~ -- 1 and rl~j = 0.

There are similar constraints as (2) and (3) for C~_lj(U ) and C~(u) at Pij for their curvature continuity by replacing the superscript u by v, and the subscript (i - l, j ) by ( i , j - 1).

2.1. Construction of the quintic basic curve mesh

From the original curve mesh, as shown in Fig. 2, we construct a so-called basic curve mesh with mesh curves {Cb~(t), i = O, 1 , . . . , m} and {Cb~(s), j = 0, 1 , . . . , n}. Each

~ o,~'(s) cb;'÷l(s ~

(a) -mn

"" °ti/ Yb~

(b)

Fig. 2. A basic curve mesh and its tangents and second derivative vectors corresponding to the curve mesh in Fig. 1. The basic twist vectors and the higher order mixed partial derivative vectors at the grid points are also shown in the figure.

Page 6: Curvature continuous interpolation of curve meshes

174 x. Ye / Computer Aided Geometric Design 14 (1997) 169-190

new mesh curve consists of quintic Brzier segments which join C 2 at the grid points. Let Cb~ (t) be the j th Brzier segment of CbU(t), and CbVj (s) be the ith Brzier segment of Cb~(s). The common tangent and second order derivative vector of Cb~_l,j(t ) and Cb~j (t) are taken as the basic tangents Tb~ and the basic curvature vector TTb~ in (2) and (3), respectively. Similarly, the common tangent and second order derivative vector of Cb~,j_, (s) and CbVj (s) are taken as the basic tangents Tb~j and the basic curvature vector TTb~j, respectively. In this way, the new mesh curves maintain the tangent slopes and curvature vectors of the original mesh curves at the grid points.

2.2. Estimation of the basic mixed partial derivative vectors

In order to generate the basic patches in the form of biquintic Hermite patches, we need to estimate a unique twist vector, called the basic twist vector, for each grid point Pij. One method to obtain the twist vector is to minimize the potential energy of the surface pathes at these grid points, as in (Hagen and Schulze, 1987; Ye, 1994; Ye and Nowacki, 1994). The potential energy of a surface patch at a point is proportional to the squared sum of the minimum and maximum principal curvatures of the surface patch at the point. At the grid point Pij, the first and the second order partial derivative vectors of the basic patches are known from the basic mesh curves. They are the basic tangent T~, Ti} and the basic curvature vectors TT~, TT~.. The only unknown to the minimization problem is the basic twist vector Vbij of the surface patches at Pij. The solution of the minimization problem can be found in (Hagen and Schulze, 1987; Ye, 1994; Ye and Nowacki, 1994) as follows:

(TT~, Nej>IT~I 2 + (TT~j, ~r~j>lTi~ 12 gl2i j = (Vbij, Nij) = 3 3

ITi I JT I + (Ti , , ( 4 )

where ( , ) represents the scalar product, and Nij is the unit normal vector of the tangent- plane at Pij, i.e.,

Hence, the basic twist vector Vbij can be taken as

Vb~j = 912~jN~j. (5)

Furthermore, we need to estimate the (1,2)-, (2,1)- and (2,2)-mixed basic partial deriva- tive vectors for each grid point. At the grid point Pij, these vectors are denoted by Xb~j, Ybij and Wb~j, respectively (see Fig. 2). These vectors can be chosen freely. For exam- ple, they can be taken as the average vectors of the four Hermite patches around the grid point. These Hermite patches are constructed by interpolating the basic tangents, basic curvature vectors and basic twist vectors at their four corner points. For simplicity, in our implementation, they are simply set to zero.

Page 7: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 175

• s • Stl(U,

. . . . . . .

! o* oo° I ! oO° , ° I ! oO° o J I

II ,° "° I , l ~ u I o-" l s S I "~ I I I , ' * I • s

I , , ° l s I ." I s s

¥

1 . . . . . . . . . . . . . . .

s s ~' s S S S

s S • I i J

I I s I I ¢s I I •

I I i s I I s

Fig. 3. The parametric transformations. Note that two of the four boundaries of sij (u, v) and tij (u, v) are constant straight lines.

2.3. Construction of the basic patches

In our constructions, basic patches are biquintic Hermite patches which interpolate the basic curve mesh, the basic twist vectors and the higher order basic mixed partial derivative vectors at the grid points. The (i,j)th basic patch Sbi#(s, t) is taken as:

Sbij (s, t) = [H(s)] T

p~j

Tb~ ×

TTb~

P~,j+l TbVj Tb~,#+l TTbVj TTb~,j+I

Pi+l,j+l TbV+l,# Tb~+l,j+l TTbV+l,j TTb~V+I,j+I

Tb~,#+ 1 Ybij Ybi,j+l Xbij Zbi,j+l

TbU+l,j+l Vbi+l,j Vbi+l,j+l Xbi+l,j Xbi+l,j+l

TTb~,j+ I Ybi# Ybi,#+l Wbij Wbi,j+j

[H(t)] (6)

TTb~+t, J TTb~+l,j+ 1 Ybi+l,j Ybi+l,j+l Wbi+l,j Wb~+l,j+l

where

[H(s) ] T = [Ho(s), H, (s), Go(s), GI (s), Ko(s), K, (s)].

and Ho, HI, Go, G1, K0 and K1 are the quintic Hermite basis functions listed in Ap- pendix 1.

The vector-valued first and second order cross-derivative functions of Sbij(s, t) can easily be computed. For example, the vector-valued first and second order cross-derivative functions along the boundary Sbij (0, t) are

aSbi#(O, t) _ Tb~Ho(t) + Tb~j+,H1 (t) + YbijGo(t) + Ybi,#+l G1 (t) OS

+ XbijKo(t) + Xbi,j+lKl (t), 02Sbij(O, t)

Os 2 = TTb~Ho(t) + TTb~,j+1HI (t) + rb~jao(t) + Ybi,j+l al (t)

Page 8: Curvature continuous interpolation of curve meshes

176 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

+ Wbi jKo( t ) + Wbi,j+l Kl (t). (7)

Since at each grid point, the four basic surface patches are constructed use a common set of basic tangents, basic twist vectors and higher order basic mixed partial derivative vectors, the basic surface Sb is C : globally.

3. Reparametrization of the basic patches

In order to compute the vector-valued cross-derivative functions of the final interpo- lation surface S by using the basic patches, basic patches should be reparametrized to match the tangents and second order derivative vectors of the original curve mesh at the grid points. The parametric transformations s = sit (u, v) and t = tit (u, v) for the basic patch Sbit (s, t) must satisfy certain position and derivative constraints. The position and derivative constraints for s = sij (u, v), for example, can be expressed as follows:

1. Position constraints:

sit(O,v) = 0 , s i j (1,v) = 1.

2. First order derivative constraints:

(8)

Osit(l, O) u Osij(1, 1) 0~ (10) 0u - POi+l'J ' au - p i+1,3+1.

3. Second order derivative constraints:

D2sij (0, O) rl~j O2sij(O, 1) Ou 2 -- , ~u 2 - rli , j+ I . (11)

°2siAl'°) T01'+,,t, 02sij(1, l) au 2 -- ~u 2 - r0U+l,j+l. (12)

Similar position and derivative constraints are imposed on the parametric transformation t = t o (u, v) for the basic patch Sbit (s, t).

The parametric transformations s = sij(u, v) and t = tij (u, v) can be taken to be biquintic Hermite functions satisfying the position and the first and second derivative constraints (see Fig. 3). Specifically, s = s i t (u ,v) is taken to be a quintic Hermite function interpolating the position functions sit(O,v) and si t (1,v) given in (8), the first order cross-derivative functions Osit (0, v ) /~u and ~sij(1, v ) /~u satisfying the con- straints (9) and (10), and the second order cross-derivative functions ~2sit(0 , v ) / o u 2 and ~}2sij(1,v)/Ou2 satisfying the constraints (11) and (12). Similarly, t = t i j(u, v) is taken to be a quintic Hermite function interpolating the position functions t i t(u, 0) and tit (u, 1), the first order cross-derivative functions ~tij (u, O)/~v and ~tij (u, 1)/~v, and the second order cross-derivative functions ~2tij(u, 0)/~}v 2 and ~ 2 t i t ( u , l)/()v 2.

From the constraints (9) and (10), the first order cross-derivative functions 0 % (0, v ) / 0 u and 0sij(1, v)/Ou can be taken as the following linear functions:

as i j (o ,o ) . 08,j(o, 1) ~u -- p l i j ' au -- ply, j+ 1 . (9)

Page 9: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 1 7 7

asq (o, v) au

asq (1, v) au

Therefore,

02sq (0, l) s2i~ =- Ouav

o%q (1, l)

- p l y ( 1 - v) + pl~,j+lv ,

= p0iU+l,j(1 - v) + pOiU+l,j+lv.

1 ~ = Pli,j+l - P ij,

- - P O i U . l _ l , j + l - - pOiUq_l,j (l = O, 1)

(13)

(14)

O2tij (k, 0) 1 v v t2i t° --- ~ = P i+l,j - p l q ,

a2tq(k , 1) v u t2i~l =- avOu - p0i+l, j+ l - p0id+l (k = 0, 1) (16)

and the (2,1)-mixed partial derivative of tq (u, v) is zero. The second order cross-derivative functions a2sij(0, v)/Ou 2 and O2sij(1, v ) / au 2 can-

not be linear. It can be clearly seen in Section 4 that the (2,1)-mixed partial derivatives of sq (u, v) at the comer points are involved in the compatibility of the (2,1)-, (1,2)- and (2,2)-mixed partial derivative vectors of the final surface patches at the grid points.

Denote the (2,1)-mixed partial derivatives of sq(u , v) at the parameter value (k, l) (k, l = 0, 1) as s3i~. Then, ~28ij(0 , V)/OU 2 and i32sij(1, v ) /au 2 are taken as the follow- ing cubic Hermite functions:

a2sq (0, v) i~u2 - r l~H~)(v) + r l i~j+lH;(v) + s3~G;(v ) - s3 m . . . . -Y i j t J l (V)~

02sij (1, v) 0 u * 1o • UG;(v) , (17) au 2 = r i+l , jHg (v) + rOU+ls+lS~(v) + s3i jGo(v ) + s3q

where, H~)(v), S~(v ) , G~)(v) and G~(v) are the cubic Hermite functions listed in Ap- pendix 1.

Similarly, the second order cross-derivative functions a2tij (u, O)/i~v 2 and O2tq (u, 1)/ av 2 are taken as the following cubic Herrnite functions:

02tq (u, O) = + t3ij G 1 (u), ~v 2 r l~jH~(u) + rlVd+lH~(u) + t3~G~(u) 1o •

a2tq (u, 1) v * 01 * 11 * av 2 = rOi,j+lHg (u) + rOV+id+lH~(u) + t3qGo(u ) + t3~jG 1 (u), (18)

and

and the (1,2)-mixed partial derivative of sq (u, v) is zero. Similarly, the first order cross-derivative functions atij (u, O)/av and a tq (u, 1) /av can

be taken as the following linear Hermite functions:

i~tij (u, O) _ plVj (1 - u) + pliV+l,ju, Ov

Otq (u, 1) v U igv = p0Vs+l (1 - u) + p0i+l,j+ 1 (15)

Page 10: Curvature continuous interpolation of curve meshes

178 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

where t3i~J denotes the (1,2)-mixed partial derivatives of tij (u, v) at the parameter value (k,l) ( k , l - - 0, 1).

The biquintic polynomial transformations s = s~j(u,v) and t = t~j(u,v) for the surface patch Sbij(s, t), as shown in Fig. 3, are as follows:

~s~j (0, v) sij (u, v) = H1 (u) + Go(u) Ou

+/;o(~) o2~j (o, v) 0u 2 + KI

tij(u, v) = Hi (v) + Go(v) ~tij(u, O) Ov

0:t~j (u, o) + K0 ('o) 0V 2 + KI

08ij (1, v) + a~(~) ~

02sij (1, v) (~) ~ ,

~tij(u, 1) + a~ (v) ~v

(v) 0:tij (u, 1) Ov 2

(19)

(20)

with the partial derivative functions given in (13), (15), (17) and (18). Let

Rij (u, v) = Sbij (sij (u, v), tij (u, v)) (21)

be the basic surface patch Sbij (s, t) after the parametric transformations s = sij (u, v) and t = tij(u, v) in (19) and (20). By differentiating (21) using chain rules, and substituting the {(k,/): 0 ~ k, 1 ~< 2} mixed partial derivatives of the transformations sij(u, v) and tij (u, v) at the corner points in the above equations into the resulting formulae, the twist vectors, (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors at the corner points can be obtained. For example, the twist vector, (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors Vrij, Xri j , Yri j and Wrij of Rij(u, v) at Pij, i.e., at the parameter value (0, 0), are as follows, respectively:

Vrij = pliUjpli~ Vbij + s2~Tb~j + t2i~Tb~j (22)

Xri j =pl~j(plVj)2Xbij + (pl~jrlVj + 2plVjs2~)Vbij

, oo v t3~Tb~,j (23) + 2 p l i j t 2 i j T T b i j +

u oo Yrij = (pl~ )2plVjYbij + (pl~jrl~j + 2plijt2ij ) Vbij

u oo ~ s3~Tb~j (24) + 2p 1 ij s2 i j TTbij +

Wrij = (pl;.plVj)2Wbij + plVj(4pl~jt2~ + pli~jrliUj)Xbij

+ pl~.(4plVjs2~ + pli~jrliVj)Ybij

~ oo oo 2pl~t3~)Vbi j+2(s2~)2TTb~. + (2pl~js3i~ + r l i j r l i j + 4s2ijt2ij + 0o v (25) + 2(t2~)ZTTb~j + s4~Tb~ + t4ijTbij,

where, s4i~ and t4i~ (k, l = 0, 1) are the second derivatives of 02sij (k, v) /~u 2 at v = l and of O2tij (u, l)/Ov 2 at u = k, respectively. The above equations are also obtained from Appendix 2 by a Maple program (Heck, 1993). Similar equations for the twist vectors, (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors of Rij(u,v) at its other three corner points with parameter values (0, 1), (1,0) and (1,1) can also be obtained.

Page 11: Curvature continuous interpolation of curve meshes

X, Ye / Computer Aided Geometric Design 14 (1997) 169-190 179

4. Generation of the final surface patches

The vector-valued first and second order cross-derivative functions of the final inter- polation surface S(u, v) is computed by using the reparametrized basic patches. For the (i, j ) th patch S~j (u, v) of S, the vector-valued first order cross-derivative functions along its boundary B6zier segments {CU+k,j(v), k --- O, 1} are taken as follows:

~S~3 (k, v) _ Osij(k, v)D~(v) + g~(v)dCU+~'J(v) (k = O, 1), (26) i~u Ou dv

02S~j(k,v) Os, ,v) DDk(v) + V) g~(v) Ou 2 ~u dv

d2 CU+ k,j +

dv 2

+ as~j(k'V)D~j(v)"ou 2 + hi 5k,kv),dCu+k,j(v)~v (k = 0, 1), (27)

where, the vector-valued functions D~j (v) and DD~j (v) are the quintic Hermite function interpolating

OSbij (s, tij (u, v)) i~2Sbij (s, tij (u, v)) i~ ~ Sbij (s, tij (u, v)) Os ' ~sOv ' ~sOv ~ '

and

02Sbij(s, tij(u,v)) 03Sbij(s,tij(u,v)) ~4Sbo(s, tij(u,v)) ~s 2 ' ~s2~v ' ~s20v 2

along the parameter lines u = s = k at v -= 0 and v = 1 (refer to constraints in (8)). That is to say,

T ~, D k (v) = Tb~+k,jHo(v ) + bi+k,j+iH1 (v) + pl~+kjYbi+k,jGo(v ) *iv *0v + pOV+k,j+l Vbi+k,j+l GI (v) + X bi+k,jKo(v ) + Xbi+kd+l K1 (v), (28)

DD~j(v) TTb'~+kdHo(v ) T ~ v = + T bi+k,j+lHl (v) + pli+kdYbi+k,jGo(v)

*lv Wb*+~k,j+! K1 (v), (29) + pOi+k,j+lYbi+k,j+lGl (v) + Wbi+~,jKo(v ) +

where

s h * l v v v~+~5 = (pl~+k,j)2Xb~+k,j + rli+k,jVbi+k,j x~.Ov _ 0 v v = ui+k,j+ 1 -- (p i+k,j+l)2Xbi+k,j+l 9- rOi+k,j+lVb~+k,j+l (k O, 1), (30)

v 2 W T~7~*lv" m+k,j = (pli+k,j) bi+k,j + rli+k,jYbi+k d wL*Ov v v oi+kd+t = (pO~+kj+l)2Wbi+t~,j+l + rOi+k,j+lYbi+k,j+l (k = 0, 1). (31)

Two of the coefficient functions in the curvature continuity conditions (Kahmann, 1983; Ye, 1995c, Ye et al., 1995) are taken to be the first and second order partial derivative functions of the parametric transform s~j (u, v) along the boundary segment u = k, and the other two coefficient functions g~(v) and h~/ are taken, so that the twist vector,

Page 12: Curvature continuous interpolation of curve meshes

180 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

(1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors of Sij(u, v) at Pij are equal to Vrq, Xrij, Yrij and Wrij in (22), (23), (24) and (25), respectively. In Appendix 2, the following solutions to the above requirements are given and proven by a Maple program:

v ko _ 2 k0 t2i ~° Go(v) + Pli+kjt3ij t2ijrli+k,j r.. . . gk j (V) = pliV+k,j (plV+k,j)2 z~,o(V)

t2ikl v kl kl v + G1 (v) - POi+k'J+lt3q - 2 t2q rOi+k,j+ 1 K1 (v) v (pO v ~2

POi+k, j+l \ i+k , j+l )

(k = 0, 1) (32)

h~j(v) [ 2(t2/k°)2 rli+k,j = - - + pli+~ jt4~j ° L- , ] Ko(v)

[ (t2i~')zrOi+k'j+' ,)] - -2 fpOV ~3 +pOi+k,j+lt4 KI(v) (k = 0, 1) (33)

\ i+k , j+ l ]

Note that the minus signs in (32) and (33) are obtained from the fact that v = 1 is the end parameter whereas formulae in Appendix 2 are only for starting parameters.

To construct surface patches with a possibly low degree, the coefficient function 9~ (v) is required to be cubic. From this requirement, t3i k° and t3i~ can be solved. From Appendix 2, we have

(k = 0, 1), (34) t3i~ ° = 2 ( rl~'+k'---------~3 - 2 t2~ ° - 2,)0v t2ijk, P l iV+ k , j

k.plV+k,j ~" i+k,j+l

POV+kd+l t ko 2(rOV+k,j+l ) t3i~' = 2 ~ 2q + + 2 t2~ ( k = O , 1). (35) P i+k , j \ 1J i+k , j+ l

Similarly, for the parameter transformation s = sij(u, v), we have

) ol = 2(rl~,J+l 2 s2i°J - 2 s215 (1 =0 ,1 ) , (36) s3u \pl~j+--------~ po~+l,j+ ~

s31} = 2POU+l'j+lpl u S20(*J + 2 ( rO~+l'j+z- + 2) S2qll (l = O, 1). (37) i,j+l \PO~+I,j+I

Since Dkij(v), DD~j(v), h~j(v), and the boundary segments C~'+kj(v ) are quintic, ~sij(k,v)/~u are linear, ~2sij(k,v)/Ou2 and g~(v) are cubic, it is clear from (26) and (27) that the first and second order cross-derivative functions are vector-valued polynomial functions of degrees 7 and 9, respectively.

The vector-valued first and second order cross-derivative functions ~&j (u, l)/Ou and 82Sij(u, l)/Ou 2 of Sq(u, v) along its other boundary segments C~,j+k(u ) (k = 0, 1) can be similarly obtained. In fact, they can be obtained from (26) to (37) by exchanging the roles of

(1) the parameter variables u and v, (2) the superscripts u and v, (3) the parameter transformations sij (u, v) and tq(u, v),

Page 13: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 181

(4) the subscripts (i + 1,j) and (i , j + 1), and (5) the (1,2) and (2,1)-mixed basic partial derivatives Xb and Yb in these equations. If the final surface patches are carefully arranged in a chess-board fashion as in

(Nowacki et al., 1992), they can be of degrees 5 × 9 and 9 × 5. This can be real- ized by, for example, taking the real coefficients (POij,rO~j , u Pl~ij, r l ~ ) in equations (2) and (3) as follows

p12~,2 j = 1 rl~i,2 j = 0 (38) U IZ

P02i+1,2 j = 1 fOal+l,2 j = 0 (39)

and the real coefficients (pOi~, rOiVj, pl~Vj, rlVj) as follows:

pO~i,2 j =- 1 rO~i,2 j = 0 (40) V V Pl2i,2j+ 1 = 1 rl2i,2j+ l = 0 (41)

and the basic tangents and basic curvature vectors are computed accordingly from equa- tions (2) and (3) and the similar equations in parametric v-direction. In this case, surface patches $2i-1,2j-1 and $2i,2 j are of degree 5 x 9, while $2i_1,2j and $2i,2j_ 1 are of degree 9 × 5.

Since the twist vectors, the (1,2)-, (2,1)- and (2,2)-mixed partial derivatives of the reparametrized surface patches Rij (u, v) in (21) at its four corner points are maintained by all the four vector-valued cross-boundary derivative functions of Sij (u, v) along its four boundary segments at the corner points (also refer to Appendix 2 for proofs), Sij has compatible twist vectors, compatible (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors. Therefore, Sij (u, v) can be expressed as standard polynomial surface patches of degree 9 × 9, or 5 × 9 and 9 × 5 if the surface patches are arranged in a chess-board fashion.

Furthermore, any two adjacent surface patches generated by the new method are cur- vature continuous along their common boundary segment. To see this, let us consider the two adjacent surface patches Si , j_ l (U , v) and Sij(u, v) along their common boundary curve C a (v). Let us construct an intermediate surface patch S*j(u, v) (Ye et al., 1995)) which passes through the boundary segment C~ (v), and which interpolates vector-valued first and second order cross-derivative functions D°j(v) and DD°j(v) in (28) and (29) along C~j(v), respectively. For example, S*j(u, v) can be taken as

Si*j(u, v) = Ci~j(v) + uD°j(v) + lu2DD°j(v) (42)

From the curvature continuity conditions (Kahmann, 1983; Ye, 1995c, Ye et al., 1995) and (26) and (27), we know that both Si,j-i (u, v) and Sij (u, v) are GC 2 with S~*j (u, v) along C~ (v). Therefore, Si,j-i (u, v) and Sij (u, v) are GC 2 along C~ (v).

5. B~zier form of the final surface

For each surface patch of the final interpolation surface S(u, v), the boundary curves are known. Each term in (28) and (29), including each boundary curve, is converted to

Page 14: Curvature continuous interpolation of curve meshes

182 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

B6zier form. Note that a cubic polynomial function (scalar or vector-valued) with starting value P0, ending value pl, and first order derivatives ti and tt~ at the starting and ending values can be converted to a cubic Bdzier functions with control coefficients (scalars or vectors/points) as follows:

{ 1 1 } Po, Po + ~to, P l - ~tj, Pl

and a quintic polynomial function (scalar or vector-valued) with starting value P0, ending value pl, and first and second order derivatives t~ and tt~ at the starting and ending values can be converted to a B6zier functions with control coefficients (scalars or vectors/points) as follows:

{ 1 2 1 2 1 1 } Po, Po + -~to,Po + ~to + ~-dtto, p~ - ~t~ + ~ t t ~ , Pz - ~t~ ,pj

see (Ye, 1995a) for more detail. The multiplications in (28) and (29) are then carried out using the following rule for multiplication of Bernstein functions

B ~ ( s ) B ' ~ ( s ) - (m)(~) Bm+n(s~, -[--~-+--~ i + j , , (43) i+j ]

where Bri n represents the ith Bernstein function of degree m. All the computed terms are degree-elevated i to degree 9 vector-valued functions, and are added together according to (21) and (22) to form the degree 9 vector-valued first and second order cross-derivative functions of the surface patch.

The boundary curves are then degree-elevated into degree 9 Bdzier curves. The first layer of B~zier points of the starting (ending) boundary curves are computed by adding the boundary control points and } ( - ~ ) of the corresponding control vectors of the vector-valued first order cross-derivative functions. The second layer of B6zier points of the starting (ending) boundary curves are computed by adding the boundary control points and } (_2) and ~2 of the corresponding control vectors of the vector-valued first and second order cross-derivative functions, respectively.

The 16 interior B6zier points are free, and can be determined by the Coons-Boolean sum scheme. As in (Ye, 1994, 1995a), they can be computed from the B6zier points already computed as follows:

Q j= l=O, 1,2,7,8,9

( i , j = 3,4 ,5 ,6)

with

¢3 = 1 ( 10, - 4 5 , 7 2 , 0 , 0 , 0 , 0 , 18 , -18 ,5 )

(~4 = 1(15, -60, 72, 0, 0, 0, 0, 48, -45 , 12) e.t. z

k=O, 1,2,7,8,9 k,/=O, 1,2 7,8,9

(44)

l A degree m Bdzier function with control coefficients {dr: i = 0, 1,2,..., m} can be degree-elevated to a l m + l - i d i degree m + 1 B6zier function with control coefficients t ,TA-TV- i + ~Tidi+ . i = 0, 1,2,... ,m + 1}

Page 15: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 183

q55 = 1 ( 1 2 , - 4 5 , 4 8 , 0 , 0 , 0 , 0 , 7 2 , - 6 0 , 15)

q)6 = 4~( 5, --18, 18,0,0,0,0,72,--45, 10)

where {Qk t , k , l = 0, 1 , . . . , 9 } , except for the 16 interior B6zier points {Q~j: i , j = 3,4, 5, 6}, are all known B6zier points.

6. Illustrations

Figs. 4 and 5 show the generation of a 9 × 9 curvature continuous ship hull based on the local surface construction method proposed in this paper. The input is a rectangular G C 2 quintic (actually cubic) curve mesh. Each mesh curve has its own chord-length parametrization. Fig. 4 shows the curve mesh. The basic tangents and basic curvature vectors at the grid points are taken as the first and second order derivative vectors of the left side curve segments of the original curve mesh. The basic twist vectors are determined using (5). Higher order basic mixed partial derivatives at grid points are all set to zero. The first and second order cross-derivative functions of the surface patches along the mesh curves are computed according to (28) and (29). Then, the B6zier points of the final surface patches are computed. The final G C 2 ship hull is displayed by its isoparametric lines in Fig. 5. Fig. 6 shows a color-coded map of the minimum principal curvature of the G C 2 ship hull, and Figs. 7 and 8 show two color-coded maps of the normal curvatures of the G C 2 ship hull in its parameter u- and v-direction, respectively. These figures together show the curvature behavior of the G C 2 ship hull. We do not show the color-coded Gaussian and mean curvature maps of the ship hull since the ship hull is fiat in most regions except in some small regions, and the change of the Gaussian and mean curvatures can hardly seen from these maps.

Fig. 4. A quintic curvature continuous curve mesh of a ship hull. Each mesh curve has its own chord-length parametrization.

~ l l I It / / 1 ~

Fig. 5. The 9 × 9 curvature continuous ship hull generated from the curve mesh in Fig. 4 using the new local surface construction method.

Page 16: Curvature continuous interpolation of curve meshes

184 X. Ye /Computer Aided Geometric Design 14 (1997) 169-190

Fig. 6. A color-coded map of the minimum principal curvature of the curvature continuous ship hull.

Fig. 7. A color-coded map of the normal curvature in the direction of the u isoparameter lines of the curvature continuous ship hull.

Fig. 8. A color-coded map of the normal curvature in the direction of the v isoparameter lines of the curvature continuous ship hull.

7. Conclusion

We have proposed a new local method to construct a G C 2 surface by interpolating a given G C 2 rectangular quintic curve mesh. The idea of the method is to satisfy the inter- patch curvature continuity requirements and to solve the twist-compatibility of surface patches at grid points during the surface construction. The method creates a quintic C 2 basic curve mesh first. By estimating the basic twist vectors and higher order basic mixed partial derivative vectors at grid points, biquintic basic patches are generated. The concept of basic patches to compute the first order cross-derivative functions for the final interpolation is extended to compute the second order cross-derivative functions. Differing from construction methods using basic patches technique and Gregory patches, our basic patches do not interpolate any mesh curves. They interpolate only the grid points, the so-called basic tangents, basic curvature vectors, basic twist vectors and higher order basic mixed partial derivative vectors at the grid points. This is because Gregory patches do not require the compatibility of twist vectors and higher order mixed partial derivative vectors, whereas these compatibility requirements are essential for the final surface patches to be representable by standard polynomial surface patches. In order to match the tangents and second order derivative vectors of original boundary curves

Page 17: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 185

at the grid points, the basic patches are reparametrized by 5 x 3 and 3 x 5 functions, which lead to degree 7 and 9 first and second order cross-derivative functions of the final interpolation surface patches, respectively, and eventually lead to a G C 2 piecewise degree 9 x 9 polynomial surface which is converted to a GC 2 composite B6zier surface. By arranging the surface patches in a chess-board fashion, the degress of the final surface patches can be 5 x 9 and 9 x 5. These lower polynomial degrees, in comparison to the method in (Nowacki et al., 1992), mean a reduction of storage of 67.25% and much greater reduction of computation time for surface interrogation can be expected. Further attractive features of the scheme are

(1) the tangent magnitudes of the original curve mesh can be modified locally while maintaining the inter-patch curvature continuity;

(2) the final interpolation surface can be edited through adjusting the magnitudes of the tangents of the basic curve mesh;

(3) the final surface can be easily integrated into state-of-the-art geometric modeling systems.

Acknowledgements

The idea of the paper originated from the author's Ph.D. thesis which was done in the Institute of Marine Technology, Technical University of Berlin, Germany. The author is very grateful to Professor H. Nowacki for his supervision of the Ph.D. thesis and Professor J. Hoschek for his careful comments on the Ph.D. thesis. He would like also to thank Professors N.M. Patrikalakis and C. Chryssostomidis, and Mr. S.L. Abrams for their support and comments.

References

Chiyokura, H. and Kimura, E (1983), Design of solids with free-form surfaces, Computer Graphics ACM 17, 289-298.

Choi, B.K., Shin, H.Y. and Yoo, W.S. (1993), Visually smooth composite surfaces for an unevenly spaced 3D data array, Computer Aided Geometric Design 10, 157-171.

Gregory, J.A. (1974), Smooth interpolation without twist constraints, in: Barnhill, R.E. and Riesenfeld, R.F., eds., Computer Aided Geometric Design, Academic Press, New York, 71- 88.

Gregory, J.A., Lau, V.dK.H. and Zhou, J. (1990), Smooth parametric surfaces and n-sided patches, in: Dahmen, W., Gasca, M. and Miccheli, C.A., eds., Computation of Curves and Surfaces, Kluwer Academic Publishers, Dordrecht, 457-498.

Hagen, H. and Schulze, G. (1987), Automatic smoothing with geometric surface patches, Computer Aided Geometric Design 4, 231-236.

Heck, A. (1993), Introduction to Maple, Springer, New York. Kahmann, J. (1983), Continuity of curvature between adjacent B6zier patches, in: Barnhill, R.E.

and BOhm, W., eds., Surfaces in CAGD, North-Holland, Amsterdam, 65-75. Liu, Q. and Sun, T.C. (1994), G ~ interpolation of mesh curves, Computer-Aided Design 26, 259-

267.

Page 18: Curvature continuous interpolation of curve meshes

186 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

Nowacki, H., Kaklis, ED. and Weber, J. (1992), Curves mesh fairing and GC 2 surface interpolation, Mathematical Modelling and Numerical Analysis 26, 113-135

Peters, J. (1990), Smooth mesh interpolation with cubic patches, Computer-Aided Design 22, 109- 120.

Peters, J. (1991), Smooth interpolation of a mesh of curves, Constructive Approximation 7, 221- 247.

Sarraga, R.E (1987), G 1 interpolation of generally unrestricted cubic B6zier curves, Computer Aided Geometric Design 4, 23-39.

Shirman, L.A. and S6quin, C.H. (1990), Local surface interpolation with shape parameters between adjoining Gregory patches, Computer Aided Geometric Design 7, 375-388.

Ye, X. (1994), Construction and Verification of Smooth Free-Form Surfaces Generated by Compatible Interpolation of Arbitrary Meshes, Verlag Dr. KOster, Berlin.

Ye, X. (1995a), Generating B6zier points for curves and surfaces from boundary information, Computer-Aided Design 27, 875-885.

Ye, X. (1995b), G 1 Smooth interpolation of curve meshes using rational B6zier patches, in: Proceedings of the 4th International Conference on CAD and Graphics, Wuhan, China, SPIE, to appear.

Ye, X. (1995c), The Gaussian and mean curvature criteria for curvature continuity between surfaces, Computer Aided Geometric Design, 1995, to appear.

Ye, X. and Nowacki, H. (1994), G l interpolation of rectangular cubic curve meshes using biquintic B6zier patches, The Sixth IMA Conference on Mathematics of Surfaces, Brunel University, U.K., in: Mullineux, G., ed., Mathematics of Surfaces VI, Oxford University Press, U.K., 429-452.

Ye, X., Liang Y. and Nowacki H. (1995), Geometric continuity between adjacent B6zier patches and their constructions, Computer Aided Geometric Design, to appear.

Page 19: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190 187

Appendix 1: Cubic and quintic Hermite basis functions

The cubic Hermite basis functions are defined as follows:

H~(v) = (1 - v)2(1 + 2v)

H;(v) = v2(3 - 2v)

c ; ( v ) = (1 - v ) %

= - ( 1 -

The quintic Hermite basis functions are defined as follows:

Ho(s) = (1 - s)3(1 + 3s + 6s 2)

HI(a) = s3(10 -- 15s + 6s 2)

Go(s) = (1 - s)3s(1 + 3s)

Gl(s) -- -s3(1 - s ) ( 4 - 3s)

1 Ko(s) = ~(1 - s)3s 2

K I ( 8 ) = I s 3 ( 1 -- 8) 2 z

Appendix 2: The Maple program

The Maple program for the construction of the first and second order vector-valued cross-boundary derivative functions of the final surface patches are listed below. The pro- gram considers up to (2,2)-order local Taylor expansions of the parameter transformations and the surface patches around a corner point, and up to second order Taylor expansions of curve segments, vector-valued derivative functions, and coefficient functions. For our purpose, it is enough to do so since only these terms are involved in the twist vectors and the (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors of the reparametrized surface patches and the final surface patches at the corner point. We omit here all the indexs for surface patches used in the paper, and use a simpler form to denote (partial) deriva- tives. For example, suuv means s~,,~, i.e., the (2,1)-mixed partial derivative of s(u, v) at the parameter value (0, 0), and Sbuuv means Sb~,, i.e., the basic (2,1)-mixed partial derivative vector at the parameter value (0, 0).

The program first defines the parameter transformations s(u, v) and t(u, v), the basic surface patch Sb(u, v) in their up to (2,2)-order Taylor expansion forms. Then, it elab- orates the up to (2,2)-order Taylor expansions R22(u, v) of the reparametrized surface patch R(u, v). This elaboration gives the formulae for the twist vector and the (1,2)-, (2,1)- and (2,2)-mixed partial derivative vectors of R(u, v) at the parameter value (0, 0). Next, the program defines the boundary segment C(v), the vector-valued first order ba- sic cross-derivative function Du(v) of S(u, v) along u -- 0, the coefficient functions p(v) and g(v), all in their up to (2,2)-order Taylor expansion forms at the parameter value (0, 0). Then, it computes the vector-valued first order derivative function Su(v)

Page 20: Curvature continuous interpolation of curve meshes

188 x. Ye / Computer Aided Geometric Design 14 (1997) 169-190

of S(u , v) along u = 0, and the difference between the (1,2)-mixed partial derivative vectors of R(u , v) and S(u , v) at the parameter value (0, 0), which is proven to be zero. It further defines the vector-valued second order basic cross-derivative function D u u ( v ) of S(u , v) along u = 0, the coefficient functions pp(v) and h(v), all in their up to (2,2)-order Taylor expansion forms at the parameter value (0, 0). After that, it computes the vector-valued second order derivative function S u u ( v ) of S(u , v) along u = 0, and the differences between the (2,1) and (2,2)-mixed partial derivative vectors of R(u , v) and S(u , v) at the parameter value (0, 0), which are both proven to be zero. Finally, the program defines a cubic Hermite function for the coefficient function g(v), and solves the (2,1)- and (1,2)-mixed partial derivatives of the parameter transformations of s(u, v) and t(u, v) at the parameter values (0, 0) and (0, 1).

>s : =(u , v ) - > s u * u + s u u * u * u / 2 + s u v * u * v + s u u v * u * u * v / 2 +SUUVV*U*U*V*V/4 ;

>t : =(U, v)->tv*v+tvv*v*v/2 +tuv*u*v+tuvv*u*v*v/2 +tuuvv*u*u*v*v/4 ;

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

>Sb: :(s, t)->S00+Sbu*s+Sbv*t+Sbuu*s*s/2+Sbuv*s*t +Sbvv* t* t / 2 +Sbuuv* s* s* t / 2 +Sbuvv* s* t*t / 2 +Sbuuvv* s*s*t*t/4 ;

>m:=(u,v)->subs(s=s(u,v), t:t(u,v), Sb(s,t)); >R22:=(u,v)->S00+subs(u=0, v=0, diff(R(u,v),u))*u

+subs(u=0, v=0, diff(R(u,v),v))*v+subs(u:0, v=0,

diff(R(u,v),u,u))*u*u/2+subs(u=0, v=0, diff(m(u,v),u,v))*u*v+subs(u=0, v:0, diff(m(u,v),v,v))*v*v/2

+subs(u=0, v=0, diff(m(u, v), u, u, v))*u *u'v/2 +subs(u=0, v=0, diff(R(u,v),u,v,v))*u*v*v/2+subs(u:0, v:0,

diff(R(u,v), u, u,v,v))*u*u*v*v/4 ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

>R22 (u, v) ;

SO0 + Sbu su u + Sbv tv v + l (Sbuu su 2 + Sbu suu )u 2

+ (Sbu suv + Sbv tuv + Sbuv su t v )u v

1 + 1 (Sbv tvv + Sbvv tv 2) + ~ (Sbu suuv + 2 Sbuu su suv

+ Sbuv suu tv + 2 Sbuv su tuv + Sbuuv su 2 t v )u 2 v

+ 2 (Sbuv su tvv + 2 Sbuv suv tv + Sbv tuvv + 2 Sbvv tv tuv

+ Sbuvv su tv2)uv 2 + 1 (Sbv t u u v v + Sbu s u u v v

+ 2 Sbuu suv 2 + 2 Sbvv tuv 2 + Sbuuvv suu tv 2

+ 2 Sbuv suuv tv + Sbuv suu tvv + 4 Sbuv suv tuv

Page 21: Curvature continuous interpolation of curve meshes

X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

+ 2 Sbuv su t u v v + Sbuuv su 2 t vv + 4 Sbuuv su tv suv

+ 4 Sbuvv su tv tuv + Sbuuvv su 2 tv 2) u2v 2

189

C:=v->S00+Sbv*tv*v+(Sbv*tvv+Sbvv*tv*tv)*v*v/2;

Du:=v->Sbu+Sbuv*tv*v+(Sbuv*tvv+tv*tv*Sbuvv)*v*v/2;

p::v->su+suv*v;

g::v->tuv/tv*v+(tuw*tv-2*tuv*tvv)/tv^2*v*v/2;

Su : =v- >p(v)* Du(v)+ g(v)* di f f(C(v), v) ;

DSu: =v- >Su(v)- subs(u=0, di f f(R22(u, v), u)) ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

s impl i fy(subs(v= 0, di f f(DSu(v), v))) ;

s imp i i fy(s ubs (v= 0, di f f(DSu(v), v, v))) ;

0

Duu : =v- > Sbuu+ Sbuuv* tv*v+(tvv* Sbuuv+ tv* tv* Sbuuvv)* v*v / 2 ;

pp : =v->suu+suuv*v+suuw*v*v/2 ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

h: =v->(tv*tuuvv-2*tuv^2*tvv/tv)/tv^2*v*v/2 ;

1 t v t u u v v - 2 tv J h := v--+

2 tv 2

Suu : =V- >p(v) ̂ 2 * DUU(V)+ 2 *p(v) * g(v)* di f f(Du(v), v)

+g(v) ̂ 2 *di f f(C(v), v, v)+pp(v)* Du(v)+h(v)*di f f(C(v), v) ;

DSuu : =v->Suu(v)-Subs(u=0, di f f(R22(u, v), u, u)); . . . . . . . . . . . . . . . . . . . . . . . . . . . .

s imp i i fy(subs (v= 0, di f f (DSuu(v), v))) ;

S impl i fy(subs (v= 0, di f f (DSuu(v), v, v))) ;

Page 22: Curvature continuous interpolation of curve meshes

190 X. Ye / Computer Aided Geometric Design 14 (1997) 169-190

>H0 : =v->(l-v) ^ 2 *(1+2 *v) ;

>HI : =v-v^2*(2-2*v);

>GO : =v->(l-v) ^ 2 *v;

>GI : =v->-(l-v)*v*v;

>g : =v- >tuv0 / tv0 *G0(v)+ tuvl / tvl *GI(v) ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

> s o ive((tuvv0 * tv0 -2 * tuv0 * tw0)/tv0 ^ 2

: subs(v= 0, di f f(g(v), v, v)), tuvv0) ;

/ tuvO t w O 4 tuvO tuv 1 \ - 2 ~ v l ) t V O ~ - 2 ~ + tvO +

> s o ive(-(t uvvl * tvl - 2 * tuvl * tvvl) / tvl ^ 2

= subs (v= i, di f f (g(v), v, v)), tuvvl) ;

2 t u v l tvv 1 2 tuvO tuv 1 "~ tvl 2 tvO - 4 t v l ] t v l - - I