Some remarks on V2-splines

Some remarks on V2-splines

Computer Aided Geometric Design 2 (1985) 325-328 North-Holland 325 Some remarks on V2-splines Gerald F A R I N * Department of Mathematics, Univers...

136KB Sizes 1 Downloads 96 Views

Computer Aided Geometric Design 2 (1985) 325-328 North-Holland

325

Some remarks on V2-splines Gerald F A R I N *

Department of Mathematics, UniversiO, of Utah, Salt Lake Cio,', UT 84112, U.S.A. Received 5 May 1985 Abstract. A characterization theorem for visually C 2 (short: V2) curves and a short derivation of u-spline interpolants is given. Keywords. Interpolating splines, curvature continuity.

1. A characterization theorem Definition. A C t space curve x ( t ) is called V 2 (visually C 2 continuous) if it is twice differentiable with respect to its arc length parameter s and has nonvanishing tangent vectors. The requirement of C 1 continuity (instead of the more general requirement of tangent continuity) is not a restriction for our purposes: we shall concentrate on piecewise polynomial curves which can always be reparametrized to achieve C t continuity without changing the polynomial degree. Some notation: Let ' + ' and ' - ' as subscripts to denote right and left limits, respectively. Differentiation with respect to arc length will be d e n o t e d by a prime ', differentiation with respect to an arbitrary parameter t will be denoted by a dot Theorem. A curve x ( t ) is V 2 i f and only if there exists a function u(t) such that

~+(t) - £ c _ ( t ) = ~(t)Jc(t). The function u( t ) is uniquely determined by the parametrization t( s ). Proof. By definition, a curve is V 2 if and only if

x:;(s)-x'(s)=O. A change of variable and application of the chain rule yields . . . 2x. +.t t .) - .( t ( t ' ) 2 x + ( t ) + .tt+)

) 2~ _ ( t ) - ( t'_' ) 2 ~ ( t ) = 0 .

which is equivalent to (1) with t'_'- t+"

(t') * This research was supported in part of the Department of Energy with Contract no. DE-AC02-82ER12046 to the University of Utah. 0167-8396/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)

G. Farin / Some remarks on V2-spfines

326

Corollary. Let x ( t ) be C 2 except at distinct parameter values t r Then x is V 2 if and only if there exist constants v~ such that

Yc+( ti) - J~_( t i ) = uiJc( ti).

(2)

Proof. Simply define v ( t i ) = v~ and u ( t ) = 0 elsewhere. Equation (2) was derived by Nielson [Nielson '74] as a property of v-splines, C a piecewise cubic interpolatory splines that are V 2 but in general (for u~~ 0) not C 2. But actually (2) holds for any piecewise polynomial V 2 curve, i.e. we can find the ~ from any particular representation of the curve. This is for example true for any of the following curve schemes:

Fowler-Wilson splines: V 2 interpolating piecewise cubics where each cubic segment is defined in a different local coordinate system [Faux, Pratt '79, p. 187; Fritsch '85]. Nielson's ~,-splines: parametric 2D interpolating splines with prescribed values vi [Nielson '74]. Manning's V 2 interpolants: parametric 2D interpolating splines with prescribed curvature values [Manning '74]. Barsky's fl-splines: parametric V 2 piecewise cubic B-spline-like curves with two global shape handles [Barsky '81]. Farin's V 2 splines: parametric V z piecewise cubic B-spline-like curves with local geometric shape handles [Farin '82]. Bartels' and Beatty's t3-splines: parametric piecewise cubic B-spline-like curves with local shape handles [Bartels, Beatty '85]. Boehm's ~'-splines: parametric piecewise cubic B-spline-like curves with local shape handles [Boehm '85].

2. Interpolatory v-splines Nielson [Nielson '74] derived the equations that determine an interpolating v-spline from a variational formulation of the interpolation problem. The above corollary allows a much shorter derivation: Let n + 1 data points xi; i = 0 . . . . . n be given together with n + 1 distinct parameter values %. Any interpolatory V 2 piecewise cubic spline must satisfy the equations

3(AX'-l Ati_ 1

AXi) = m i - 1 2 (+A t i - l + A t i ) + u i A t i - l A t i / 2 AtZi All_ 1 Ati_lAti

m,+--" At i ' i = 1 .....

n -

1

(3)

for some constants v~, where m~ = ±(t~). In order to derive (3), we observe that for t ~ (q, t,÷a), the interpolant can be written as

x( t ) = x i H 3 ( r ) + miAtiH13( r ) + mi+ aAtiH3( r ) + xi+ lH3( r ), where the H3 are cubic Hermite polynomials (see [Boehm et al. '84, p. 14]) and r = (t - t i ) / A t i. Imposing 5 t + ( q ) - ~ _ ( q ) = vim i yields (3). Together with two end conditions, (3) can be used to compute the unknown tangents mi. The ~,~ in (3) are called 'tension parameters' by Nielson [Nielson '74]. The author is currently

327

G. Farin / Some remarks on V2-splines

experimenting with m e t h o d s to assign the ui automatically. The following e x a m p l e m a y serve to illustrate the effect of a suitable choice of the p~. 3. E x a m p l e O u r data points are x i = 0.000, 0.097, 0.190, 0.280, 0.363, 0.436, 0.497, 0.538, Yi = 0.000, 0.069, 0.150, 0.243, 0.348, 0.463, 0.589, 0.723. We choose Bessel end conditions and chord length p a r a m e t r i z a t i o n (see [Boehm et al. '84, p. 13]).

Fig. 1. Plot of curvature vs. parameter of standard C 2 interpolating spline curve (~,, = 0).

--O

Fig. 2. Plot of curvature vs. parameter of Vz interpolating p-spline curve (v, ~ 0~

X

Fig. 3. The standard C 2 interpolating spline curve.

328

G. Farin / Some remarks on Ve-splines

I n industrial application, it is c u s t o m a r y to plot the c u r v a t u r e of a curve to j u d g e its quality; we take the same a p p r o a c h a n d plot c u r v a t u r e vs. p a r a m e t e r for two choices of u~. Fig. 1 shows the curvature of the i n t e r p o l a n t for ui = 0, i.e. for a s t a n d a r d C 2 spline. Fig. 2 shows the result of interactive changes to the u~- the resulting c u r v a t u r e plot is m u c h smoother. T h e values for the v~ are - 1 0 , 25, - 1 0 , 5, 0, - 5 . Fig. 3 shows the i n t e r p o l a n t c o r r e s p o n d i n g to Fig. 1; the i n t e r p o l a n t c o r r e s p o n d i n g to Fig. 2 c a n n o t be distinguished from it o n the scale used.

References Barsky, B. (1981), The fl-spline: A local representation based on shape parameters and on fundamental geometric measures, Dissertation, Univ. of Utah, Salt Lake City. Bartels, W. and Beatty, S. (1985), fl-splines with a difference, submitted for publication. Boehm, W. (1985), Curvature continuous curves and surfaces, Computer Aided Geometric Design 1, 313-323, this issue. Boehm, W., Farin, G. and Kahmann, J. (1984), A survey of curve and surface methods in CAGD, Computer Aided Geometric Design 1, 1-60. Farin, G. (1982), Visually C 2 cubic splines, CAD 14. 137-139. Fritsch. F. (1985), Fowler-Wilson splines are ~,-splines,submitted for publication. Manning, J.R. (1974), Continuity conditions for spline curves, Computer J. 17, 181-186. Nielson, G. (1974), Some piecewise polynomial alternatives to splines under tension, in: R.E. Barnhill and R.F. Riesenfeld, eds., Computer Aided Geometric Design, Academic Press, New York.