# Curves and surfaces in computer aided geometric design - Yamaguchi F.

**Download**(direct link)

**:**

**42**> 43 44 45 46 47 48 .. 90 >> Next

4. Spline Interpolation

O-M-l '

l^i J>. (4.35)

2 —> i +1

Therefore we have:

(s, +1 -s.) ft,'-1 + 2 (s, +1 -s,_ J ft,- + (Si- s,_ J ft; +1

= (^^3(s,~-s,)fe~S'-l)2(6"1~e')+(S'+‘~Si)2(a~ei-l)}

(4.36)

(1 ^i ^n— 1).

If the curve length is approximated by chord length:

S, — Sj-! =Cj

Sf+1 —sf = cl+

(4.37)

then Eq. (4.36) becomes:

ci+1 ft-1+2 (ci+i+c,-) ft;+Cj- ft;+1

3

{c,2 (ft +! - ft) + cf+ r (ft - ft - J} (4.38)

c,cl+1 (l^i^n-1).

As a special case, consider a given sequence of points separated by approximately equal intervals:

ci-1 = ci = ci+1 = c-

Then Eq. (4.38) becomes:

cft;_1+4cft + cft+1 = 3(6; + 1-ft_1). (4.39)

Expressed in terms of the tangent vectors this becomes:

ft -1 + 46, + ft +! = 3 (ft +1 - ft. t). (4.40)

A formula for the i-th curve segment can be obtained by performing the subscript substitution (4.35) in (4.27):

"ft -Ã

P,(s) = [s3 s2 s 13-ZVr1

ft;-i . q: .

(4.41)

4.7 Parametric Spline Curves

Next, performing a parameter transformation for the ã'-th curve segment Pi(s), corresponds to x ^s^s;, if the transformation is of the form:

S = Sj_i+(S;-S;-i)t.

Substituting this relation into (4.41) gives: Pt(t) = [t3 t2 t 1]

fo-S,-!)3

0

3S;_1(S1--S1_1)2 (s, &i —1)2

3s?_ j (s, —s,_ J 2sl_1(sl — s,_

s?-i s?-i

2 -2 sl-sl_1

= [t3 t2 t 1]

= [t3 t2 t 1]

0 0 si — sl_l

1 0 0

2-2 1 1' -3 3 -2 -1

0 0 10 10 0 0

0 0

0 0 ËÃ1

Sj Sj — 1 0

si 1

s, —S,_ 1 - or

— (S; — St _ 1) 0

0 0,-1

0 _ Î,

O-i 0

(4.42)

O-i

0

O'-1

o;

= [HOiO(0 H0A(t) Hl 0(t) ÿ1Ä(0]

— D^o,o(0 ^i,i(03

(s,-s,-i)0,'-i . (s,-s,-l)0,'

O-i

Î

(s.-s.-jo;-! (sj-s.-oo;.

O-i Qi

ci Qi-i . cM'i

Qi-i Qi

O-i Î

(4.43)

(4.44)

(4.45)

(4.46)

As can be seen from Eq. (4.45), to determine all curve segments Pt(t) (ã = 1, 2,..., n) it is necessary that the (w+1) unit tangent vectors Q'0, 0i, ..., 0' be determined. However, since (n — 1) conditions are given by Eq. (4.38) which expresses the condition that the curvature vectors be continuous, it is necessary

150

4. Spline Interpolation

to add two more conditions to (4.38) so that all of the unit tangent vectors are determined and, hence, all of the curve segments are determined.

Let us now take a closer look at the connection points between two curve segments Pt(t) and Pl+l{t) which have been determined in the above manner. The formulas for curve segments P;(?) and Pi+1(?) are:

The tangent vectors at the connection point are found by differentiating (4.47) and (4.48) and setting t = 1 and t = 0, respectively:

Next, let us find the relation between the second derivative vectors /*,(1) and /* + 1(0). Using Eqs. (3.16) for the second derivatives of H0>0(t), ..., ß1Ä (f) gives:

Substituting Qi — Qi-i and Ql + l — Qi in (4.50) and (4.51) into (4.38) and rearranging terms gives:

' 6,-i '

Ë(0 = [ßî.î(0 ÿî.1(0 Huo(t) ÿì(0] Ql

(4.47)

(4.48)

Ë(1 ) = c,Ql Pl+i(0 ) = c1+1q;.

These give the relation:

Ë+.(0)=— Ë(1) = ^Ë(1)

ct

where:

(4.49)

^(1)=-á(å{-é-1)+2ñ?(2å;+å;-1)

^+1(0)=á(é+1-é)-2ñ,.+1(2á;+á;+1).

(4.50)

(4.51)

K = ci+\!ci-

(4.52)

4.8 End Conditions on a Spline Curve

151

The curvature vector continuity condition (4.52) is equivalent to the general case

(1.52) with 0 = 0.

We now use curvature vector equation (1.24) to determine whether or not the curvature vector is continuous on both sides of the connection point when relations (4.49) and (4.52) hold.

For the segments on both sides of the connection point Qt, first, on the curve segment Pt(t) side, we have:

(f,(l)xfi(l))xP,(l) =

p.af K,n'-

On the curve segment Pi + l(t) side we have:

JP, + ,(0)xP, + ,(0))xjV,(0)

,+ 1 P, + i(0)4

(ß,Ð,(1)õß?Ð,(1))õ/1|Ð,(1)

“ (ß,Ð,(1))4

_(Ë(1)õÐ,(1))õË(1)

p,(ir

= ê,ë,.

This confirms that we have generated a curve which, at the connection point, is continuous not only to the slope, but to the curvature vector.

4.8 End Conditions on a Spline Curve

Equation (4.38) holds for l^i^n—1. This relation can be expressed in matrix form as follows:

M

= B

(4.53)

where:

M=

c2 2(c2 + c1) cx 0 0

0 c3 2 (c3 + c2) c2 0 0 ... .........................................

cn 2(cn + cn_!) C„_ j

152

4. Spline Interpolation

{cf«22-e.HcKft-e»)} {cHQ3-Qi)+cl(Q2-Q1)}

¦ K2-, (ft,-ft,-,)+c»2 (a -1 - ft-2»

Matrix M is (n — 1) x (n +1); it is not square, so an inverse matrix does not exist. If we express conditions at the ends Q0 and Qn of the curve by some means, we can replace M and Â by an (n +1) x (n + 1) matrix M and an (n +1) x 1 matrix Â; then Eq. (4.53) is replaced by the following:

M

= B.

(4.54)

From this we obtain:

= M lB.

Qo> Q'l, •••> Qn are determined. Substituting these into Eq. (4.45) determines all of the curve segments P,(?) (i= 1, 2,..., n).

(1) Case in which unit tangent vectors are specified at both end points Q0 and Qn

Specify the unit tangent vectors Q'0 and Q'n at the end points Q0 and Qn as follows:

Qo — to Qn = tn.

Then the matrices M and Â become:

4.8 End Conditions on a Spline Curve

M =

1 0

c2 2(02 + 0,) Cl

0

c3 2 (c3 + c2) c2

**42**> 43 44 45 46 47 48 .. 90 >> Next