curvature continuous curves and surfaces

11

Click here to load reader

Upload: wolfgang-boehm

Post on 02-Jul-2016

237 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Curvature continuous curves and surfaces

Computer Aided Geometric Design 2 (1985) 313-323 313 North-Holland

Curvature continuous surfaces

curves and

W o l f g a n g B O E H M

Angewandte Geometrie und GDV. TU Braunschweig, Fed. Rep. Germat O'

Received 8 February 1985 Revised 8 March 1985

Abstract. A simple methods is given for constructing the Brzier points of curvature continuous cubic spline curves and surfaces from their B-spline control points. The method is similar to the well-known construction of Brzier points of C 2 splines from their B-spline control points. The new construction allows the use of all results of the powerful Bernstein-B~zier technique in the realm of geometric splines.

A simple introduction to nu- and beta-splines is also derived, as well as some simple geometric properties of beta-splines.

Keywords. Splines, splines under tension, nu-splines, beta-splines, computational geometry, computer aided design, curves, surfaces.

I. Geometric splines

A compos i t e cubic curve that is curva ture con t inuous everywhere is cal led a geomet r ic spline. Such a geomet r ic spl ine can easi ly be genera ted from its Brzier points , d e t e r m i n e d by a s imple cons t ruc t ion given by Fa r in in 1982 [Far in '82]:

Let d i, i = 0 . . . . . m, be the vert ices of any given 2D or 3D cont ro l po lygon , choose the in te r io r Brzier po in ts t b3i+t, b3i+ 2 on the po lygon leg d~, di+ t, then

de t e rmine the j u n c t i o n po in ts b3~ from (1 + 8i)b3i = dib3i_ 1 + b3i ÷ 1, where

8 i= + ( h i / g i ) 1/z. (1)

gi, hi are the d is tances be tween the po in t s b3i_ 2, b3i+2 and the s t ra ight l ine T through b3,_ 1 and b3i+l, respect ively, as shown in Fig. 1. No te that bo th po in ts must lie on the same side of T.

Usual ly , the Brzier segment ( i ) is desc r ibed in terms of the local p a r a m e t e r t i ~ [0, 1]. However , one can easily in t roduce a g lobal p a r a m e t e r u by

U = ld i "~- Ait i , A i = L / i + 1 - - L / i ,

where u i are the knots , co r r e spond ing to the j u n c t i o n po in t s b3i, and

Ai+ t = 8iA i. (2)

N o t e that a geometr ic spl ine is at least C t con t inuous with respect to this g lobal pa ramete r . A d i s advan tage of Fa r in ' s cons t ruc t ion is that the p a r a m e t e r 8 i is ca lcu la ted by the use of

Euc l idean dis tances .

1 Here, the notation of the "Survey" [Boehm et al. '84] is used.

0167-8396/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)

Page 2: Curvature continuous curves and surfaces

314 W. Boehm / Curvature spfines

- g , - I - e

" 42 o,

N ~ [ . - -h , - - I -

cont ro l point d,,, 1 : I I I

Uo UH Ui

Fig. 1. Farin 's construction of a geometric spline.

6i UI° I Um

We shall now proceed to give a formulation for geometric splines that makes use of affine concepts only.

Let pi:o,: 7 i be the ratios of the (positive) distances determined by the four points d r b3,+1, b3/+2, di+ 1, so that

(p, + o, + 7 , ) t , 3 , + , = p,d,+l + (o, + 7,)d, ,

(Pi + Oi + "ri)b3i+ 2 = (Pi + ° , ) d i + l + 7idi,

In terms of these ratios the curvature condition (1) can be written as

32 = hi h i / g i o/ 7 ,_1 (3) gi ei / ei Pi ° i - 1

where ei is the distance between d~ and T, see Fig. 1. Using the global parameter u it is easy to check that the following ratios

p i : O i : T , = ' ~ i A i _ l : A i : ' ~ i + l A i + l , all i, (4)

satisfy the curvature condition (3). Therefore, y, can be considered as a weight factor corresponding to the control point d~ or to the knot u~.

Note that, in a typical curve design situation, where it is more intuitive to vary the (geometric) Brzier points along the control polygon than to assign (algebraic) factors to the control points, these factors will be computed from the ratios P~: o~ : 7~ using (2), (3) and (4), i.e. by

"Yi = Oi Oi- I ] '

as well as 3i by (3). It should be mentioned that in contrast to (1) equations (2), (3) and (5) make use of affinely

invariant ratios only. At both ends of the geometric spline, one may additionally prescribe the 'end points' b 0 and

b3m , a s realized in the figures, together with the restriction u ~ [u 0, Urn].

Page 3: Curvature continuous curves and surfaces

W. Boehm / Curvature splines 315

2. Shape control

For any given control polygon the ratios p~: g : ~'r, as well as the factors 8~ and 7,., control the local shape of the curve:

If ~',-i and g are small relative to g - 1 and Pr, i.e. 8r is small, the junc t ion point b3i a p p r o a c h e s b3r+l , and the curve segment (i - 1) is shifted to dr+ l, see Fig. 2.

If r r-] and P, are small relative to g _ ] and g , i.e. 3'i is small, the junc t ion point b3i approaches d r, and the curve is pulled towards this control point.

In part icular , if Pi and z~ are small relative to g , i.e. if Yr and y,+] are small, the curve segment ( i ) will be stretched, see Fig. 3. In the degenera te case where ~'r, ~'~+~ --" 0 (and for any

i w b31 ~,.,."

x ~ , . , ~ ' "

d i - 1 I I

di

A i - 1 A i i i i Ui Ui+l

C::=--

Fig. 2. Shape control: the influence of 8,.

d i

dt.1 ai-1 I I

Ui-1

AI I I Ul Ui.1

/~1°1

Ui°2

Fig. 3. Shape control: the influence of 7, "1',+1-

Page 4: Curvature continuous curves and surfaces

316 14/. Boehm / Curvature splines

6i-i , 8i) the curve will locally degenerate to the polygon leg between di and d~+ 1- Thus 1/3,i can be considered as a ' tension parameter', corresponding to the control point d~.

In contrast, if 3'~ = 1 for all i, the geometric spline will be a cubic C 2 spline, defined by the control points d~ and the corresponding knots u~ [cf. Boehm et al. '84].

3. The insertion of a new knot

Any point and any tangent of a geometric spline at u = x can be constructed from its B6zier points, e.g. by the algorithm of de Casteljau [cf. Boehm et al. '84], as shown in Fig. 4. Furthermore, the algorithm of de Casteljau constructs the B6zier points of a subdivision of the involved segment at x. This subdivision corresponds to a change of the control polygon that can easily be recovered from the B6zier points:

Let x ~ [u,, ut+l] be the new knot to be inserted and let A 1, = x - u t, AZt = u,+ 1 - x . Then the two control points d, and d/+ 1 are to be replaced by the three points

where

d~ = - , - 1((~,- , ,~,-~ + '*,-1 + ~';,~l,)d, + ~,,#,~d,_,), d~+, = ~,((-~,,~,_, + ,~',)d,+, + ( , ~ + ~',+ l ,~ ,+ , )d , ) ,

d/+z=al+,(~ty/+zA'td,+2 + (y/+2 A2 + At+ , + y ,+2A,+2)d,+, ) ,

~l = 1/(~'1A/-1 + A / + Tl+ 1A/+l ),

and

7) Y/A / ?)+ 1 = 1, A 1, + ~tA~ '

are the corresponding factors, and where

~;+ 2 ~

"YlAt_l + All A~ + 3't+1At+1 , 77 /

A t _ 1 + A l l A2 + AI+I if/

7/+1A/

-q/Air + A~ (6)

Fig. 4. The algorithm of de Casteljau.

d~

A~ A~ I I

Ui A Ui.1 x

di-1 I I

Page 5: Curvature continuous curves and surfaces

IV. Boehm /Curvature splines 317

d., d!

dt

dl3"1 • I

Ut I A ' UI*I

×

Fig. 5. Insert ing a new knot.

Note that

V/tA 1, + ~,~,~z3~ = ~,,A, and rt,V~+ 2 A', + ~ -' Y/+ 2 A / = Yl+ IAt .

Fig. 5 shows the construct ion. The control points and the knots should be r enumbered after the insert ion of x.

No te that this ' inser t ion of a new knot ' can be considered as a first step of a 'de Boor a lgor i thm' , whose further steps are:

a[ 1 a ((~.,la,_, + AI,)a/+, + A~a/), V;a,-i +

aL, (A',a/+ 2 +(,a~ + v/+ ~_A,+ ~ )a:+, ), z~/+ y/+zA/+l

and

1 a: = ~ ( AI, a L , + A'-,a~ ) = s( .~ ).

4. G e o m e t r i c B - s p l i n e s

Apar t f rom its end points, any geometr ic spline curve is uniquely defined by its control points d i, together with the ratios 0i: oi: % or the knots u i and the factors yi. The curve may be wri t ten as

s(u) = E a , g , ( . ) . (7) i

where the M i ( u ) are 'geometr ic B-splines' , depending on the knots u k and the factors "/k- The B6zier ordinates bj.~ of any B-spline M~(u) can easily be derived f rom the ident i ty

g,( ~) = Y'.8~.y,( . ) . (8)

Page 6: Curvature continuous curves and surfaces

318 W, Boehm / Curvature splines

where 8i.t is the Kronecker delta. By the construction given above one gets the four nonvanish- ing inner B6zier points

b 3 i _ 2 . i = o t i _ l ' Y i _ l A i _ 2 , b 3 i - i . ~ = b 3 i _ z . i W o t i - l A i - i ,

b3i+2,i = °ttYi+ IAi+ 1, b3i+ l,i = b3i+2,i + ° l iA i , (9) and the three nonvanishing junction points

b30-1) , i = B i - 1 A i - ~b3i- 2.i,

b3i,i = t~, ( A i _1 b3i+l. i + A i b 3 i _ l , i ) , (10)

b3(i+ l).i = Hi+ 1Ai+ lb3i ~- 2.,,

where/~ = 1/ (A,_ 1 + Ai) and a, as above. All other bj./vanish, see Fig. 6. Note that these geometric B-splines in general are not curvature continuous. However, it is

easy to derive from their B6zier representation [cf. Boehm et al. '84] that

M/' (u j + ) = M; ' (uj - ) + M;( u j ) .~ j , (11)

where

depends only on the factor ~,j and not on the B-spline M~(u) and ' denotes differentiation with respect to the global parameter u.

Note also that (6) can be written as

(1 1)(11);(1 ) 1 , ) 1+1 _

In the special case where all vj vanish, i.e. where all yj = 1, the geometric B-spline Mi(u ) coincides with the usual C 2 B-spline Nj(u), while if all 7j vanish, i.e. all ~,, = m, the geometric B-spline M~(u) degenerates to a B-spline G,(u) that is defined by the B6zier ordinates (see also Fig. 7)

1, if j = 3 i - 1, 3i, 3i + 1, cj.,-- 0, otherwise.

1 .b5.2 b7.2

/~0 ~1 "~2 "~3

Fig. 6. B6zier points of the geometric B-spline M2( u ),

[>

?

Page 7: Curvature continuous curves and surfaces

W. Boehm / Curvature splines 319

5 . N u - s p l i n e s a n d b e t a - s p l i n e s

+ E J

From the formulas (7) and (11) one immediately gets

, , - - s t t Jr- P j S ' S + - - -

at any knot uj. Composite C t cubics that satisfy these conditions were first considered by Nielson in 1973 [Nielson '74]: For given vj and given junction points pj the solution of the corresponding interpolation problem minimizes the 'energy'

2.

The solution is called a v-spline. Using the geometric B-splines above the Nielson's interpolation problem can be written as

Y]M, (u j )d ,=p j , forall j , i

where the matrix of the M,(uj)= b3j.~ forms a tridiagonal matrix, to be computed by (10). Thus a v-spline is an interpolating geometric spline.

A more special geometric spline was considered in 1981 by Barsky [Barsky '81]: In the very special case, where 8j = fl and "/j = 7 are fixed for all j , 'adjacent' B-splines differ only by a 'stretch factor' fl in the u-direction. Thus they are 'duplicates' of one B-spline M(u), if they are represented by local parameters t~ ~ [0, 1]. The corresponding special geometric splines are Barsky's fl-splines. The influence of varying the global parameters fl = fll and (1/7 - 1) =/32 can easily be demonstrated as it was done for single 8~ and y~ (see Figs. 2 and 3).

As a consequence of the special choice of 8j and 7j any fl-B-spline Mi(u ) can be written as a linear combination of the special B-splines N, (u) and G~(u), shown in Fig. 7,

M,(u) = (1 - X ) G , ( u ) +XN,(u), where

l + f l + f l 2

Thus any fl-spline

s(u)=Ed, M,(u) i

C3i-l,i C3i,i C3i*l,i

Gdu)

. . ~

~ 0 a

1 " " fl

Fig. 7. Decomposition of a fl-B-spline.

Page 8: Curvature continuous curves and surfaces

320 W. Boehm / Curvature splines

X--O

di

V.

"" 1

Fig. 8. Barksy's fl-spline as a linear blend.

: f3 I

Ui t t

may be constructed either as a special geometric spline, using constant ratios p,'oi: Ti= 7: fl: 3'fl 2, or as a linear blend of the usual C 2 spline Efl~N~(u), defined by the control points d,, and the control polygon E,diG,(u), defined by the B6zier points c3,_ 1 = c3~ = c3~+1 = d~,

s = (1 - X ) E d , G ~ + hEd~N,, i i

as illustrated in Fig. 8. Barsky's fl-B-spline M(u) depends on fll and f12. A further idea of Barsky was to interpolate

different fl/s by quintic polynomials in u. However, this will raise the degree of M(u) as well as the degree of the fl-spline itself [Barksy '83], which is undesirable.

6. Geometric spline surfaces

Geometric B-splines as shown in Fig. 6 depend on the knots and the weight factors. Let Mi(u) be the ith B-spline that corresponds to knots u k and factors Yk, and let M/(v) be the j t h B-spline that corresponds to knots v k and factors q~k. Any linear combination

s(u, v ) = E Ed , , jM, (u)Mj(v ) j i

forms a tensor product surface. From this basis representation immediately follows: Any isoparametric line of constant u or constant t, is a geometric spline.

Moreover, the surface is curvature continuous, i.e. any plane section is curvature continuous. This follows immediately from the fact that both fundamental forms are continuous [Kahmann '85] and from Meusnier's theorem [cf. do Carmo '76].

The points d,.j are called control points, forming a control net. From this net the Bdzier points are constructed in two steps, using the tensor product properties [cf. Boehm et al. '84, p. 29ff]:

First, determine all B6zier points b* k of curves, defined by the rows i of di. j and corresponding knots vj and factors ¢pj.

Next, determine the B~zier points bj, k of curves, defined by the columns of b*i.k and corresponding knots u~ and factors 7~.

Page 9: Curvature continuous curves and surfaces

W. Boehm / Curvature splines 321

The net of the bj, k forms the desired B4zier net. In the same way one constructs an interpolating geometr ic spline surface in two steps. The

use of fl-splines restricts the variety of surfaces. Note that a distinct factor at one knot line, say 7, at u i, will affect the surface along the

whole curve u = ui as a consequence of the tensor p roduc t properties. It should be mentioned however that a ' local tension' can be applied by the use of rational cubic spline surfaces [cf. Boehm '82, Boehm et al. '84].

bo,s q l b ~ / f do.1 i ~

½:

Vl

vo Uo

!

Ul U2 Uz U4 Fig. 9. Cup, control net and knot lines.

Fig. lO(a). Cup, C 2 continuous.

i i 3.0

Fig. 10(d). Rational cup.

/ ,

t::=--

Fig. lO(b), (c). Cup, curvature continuous.

0.333

Page 10: Curvature continuous curves and surfaces

322 14/. Boehm / Curvature splines

7. Examples In practice it is convenient to avoid explicit use of end control points d o, d,,: Similar to the

well-known C 2 case [cf. Boehm et al. '84] one uses the polygon b 0, b t, d] . . . . . d,,,_ t, b3.,_ I, b3.,, see Fig. 1. This convent ion is also used in the following examples.

! i ~ V2

UI U2 U3 U4

Fig. 11. Wing, control net and knot lines.

2.0

• 5 , ,

Fig. 12(a). Wing, C 2 continuous. Fig. 12(b). Wing, curvature continuous.

Fig. 13(a). Cup, C 2 continuous. Fig. 13(d). Rational cup.

Page 11: Curvature continuous curves and surfaces

14(. Boehm / Curt~ature splines 323

~'~¢: '~.

Fig. 13(b), (c). Cup, curvature continuous.

Fig. 14(a). Wing, C 2 continuous. Fig. 14(b). Wing, curvature continuous.

Fig. 9 shows the c o n t r o l ne t o f a cup t oge the r wi th the ut ,-plane, u is a r o u n d the surface , v is

f r o m the b o t t o m to the top. Figs. 1 0 ( a ) - ( c ) s h o w the cup i tself for d i f f e r en t 3'i and %: (a) all

yi =q0j = 1, (b) Yt = 0.5, (c) rp t = 0.333. Fig. 10(d) shows the cup as a r a t iona l su r face wi th a

w e i g h t 3.0 at dt. t. Fig. 11 shows the con t ro l ne t of a w i n g t oge the r w i th the m,-plane , u is f r o m the end edge

o v e r the top s ide a n d the nose b a c k to the end edge, v is f rom the r ight ea r to the left ear. Figs.

12(a) and (b) s h o w the w i n g itself: (a) all 3', = % = 1 and (b) 3q = Y3 = 2.0, 3'2 = 0.5, ep 1 = 0.333.

References

Boehm, W. (1982), On cubics, A survey, Computer Graphics and Image Processing 19, 201-226. Boehm, W.. Farin, G. and Kahmann. J. (1984), A survey of curve and surface methods in CAGD, Computer Aided

Geometric Design 1, 1-60. Barksy, B. (1981), The beta-spline, A local representation based on shape parameters and fundamental geometric

measures, Ph.D. Thesis, University of Utah. Barksy, B. (1983), Local control of bias and tension in beta-splines, ACM Trans. Graphics 2, 109-134. do Carmo, M. (1976), Differential Geometry of Curt,es and Surfaces (Prentice Hall. Englewood Cliffs, N J). Farin, G. (1982), Visually C 2 cubic splines, Computer-aided Design 14, 137-139. Kahmann, J. (1982), Kri~mmungsi)bergange zusammengesetzter Kurven und Fl~chen - Detailfragen des CAD,

Dissertation, TU Braunschweig. Kahmann, J. (1985), Private communication, see also [Kahmann '82]. Nielson, G. (1974), Some piecewise polynomial alternatives to splines under tension, in: Barnhill, R. and Riesenfeld, R.,

eds., Computer Aided Geometric Design, Academic Press, New York.