<<

B(asic)-Spline Basics



Carl de Bo or

1. Intro duction

This essay reviews those basic facts ab out (univariate) B-splines which are of interest

in CAGD. The intent is to give a self-contained and complete development of the material

in as simple and direct a way as p ossible. For this reason, the B-splines are de ned

via the recurrence relations, thus avoiding the discussion of divided di erences which the

traditional de nition of a B-spline as a divided di erence of a truncated power

requires. This do es not force more elab orate derivations than are available to those who

feel at ease with divided di erences. It do es force a change in the order in which facts

are derived and brings more prominence to such things as Marsden's Identity or the Dual

Functionals than they currently have in CAGD.

In addition, it highlights the following point: The consideration of a single B-spline

is not very fruitful when proving facts ab out B-splines, even if these facts (such as the

smo othness of a B-spline) can be stated in terms of just one B-spline. Rather, simple

arguments and real understanding of B-splines are available only if one is willing to consider

al l the B-splines of a given order for a given knot sequence. Thus it fo cuses attention on

splines, i.e., on the linear combination of B-splines. In this connection, it is worthwhile

to stress that this essay (as do es its author) maintains that the term `B-spline' refers to

a certain spline of minimal supp ort and, contrary to usage unhappily current in CAGD,

do es not refer to a which happ ens to b e written in terms of B-splines. It is to o bad

that this misuse has b ecome current and entirely unclear why.

The essay deals with splines for an arbitrary knot sequence and do es rarely b ecome

more sp eci c. In particular, the B(ernstein-Bezier)-net for a piecewise p olynomial, though

a (very) sp ecial case of a representation by B-splines, gets much less attention than it

deserves, given its immense usefulness in CAGD (and spline theory).

The essay deals only with spline functions. There is an immediate extension to

spline : Allow the co ecients, be they B-spline co ecients or co ecients in some

2 3

p olynomial form, to b e p oints in IR or IR . But this misses the much richer structure for

spline curves available b ecause of the fact that even discontinuous parametrizations may

describ e a smo oth curve.

Splines are of imp ortance in CAD for the same reason that they are used wherever

data are to be t or curves are to be drawn by computer: b eing p olynomial, they can be

evaluated quickly; b eing piecewise p olynomial, they are very exible; their representation

in terms of B-splines provides geometric information and insight. See Riesenfeld's con-

tribution in this volume for details concerning the use of splines and, esp ecially, of their

B-spline representation, in CAD. See Cox' contribution for details concerning numerical

algorithms to handle splines and their B-spline representation.

The editor of this volume has asked me to provide a careful discussion of the place-

holder notation customary in mathematical pap ers on splines. This notation was invented

by p eople who think it imp ortantto distinguish the function f from its value f (x) at the

p oint x. It is customarily used in the description of a function of one variable obtained



supp orted by the United States Army under Contract No. DAAL03-87-K-0030

from a function of two variables by holding one of those two variables xed. In this essay,

it app ears only to describ e functions obtained from others by shifting and/or scaling of

the indep endent variable. Thus, f ( z ) is the function whose value at x is the number

f (x z ), while g ( + ) is the function whose value at t is g ( + t), etc.

It is also worth p ointing out that I have b een very careful to distinguish between

`equality' and `equalityby de nition'. The latter I have always indicated by using a colon

r

on the same side of the equality sign as the term being de ned. I use D f (instead of

(r )

f ) to denote the r th derivative of the function f , and use  to denote the collection

r

of all p olynomials of degree  r . The notation  for the collection of all p olynomials of

degree < r (i.e., of order r ) will be particularly handy. Finally, I use a double p erio d to

indicate an interval; e.g., [x::y):= f(1 t)x + ty :0  t< 1g. This helps to distinguish

the interval (a::b) from the point (a; b)in the plane, or the interval [a::b] from the rst

divided di erence [a; b].

2. B-splines de ned

We start with a partition or knot sequence, i.e., a nondecreasing sequence t :=



. The B-splines of order 1 for this knot sequence are the characteristic functions of t

i

this partition, i.e., the functions



1; if t  t< t

i i+1

(2:1) B (t):=X (t):=

i1 i

0; otherwise.

Note that all these functions have b een chosen here to b e right-continuous. Other choices

could have b een made with equal justi cation. The only constraint is that these B-splines

should form a partition of unity,i.e.,

X

B (t)= 1; for all t: (2:2)

i1

i

In particular,

t = t implies B =X =0: (2:3)

i i+1 i1 i

From these rst-order B-splines, we obtain higher-order B-splines by recurrence:

B := ! B + (1 ! )B (2:4a)

ik ik i;k 1 i+1;k i+1;k 1

with



tt

i

; if t 6= t

i i+k 1

t t

i

i+k 1

! (t):= (2:4b)

ik

0; otherwise.

Thus, the second-order B-spline is given by

B = ! X + (1 ! )X ; (2:5)

i2 i2 i i+1;2 i+1

and so consists, in general, of two nontrivial linear pieces which join continuously to form

a piecewise linear function which vanishes outside the interval [t :: t ). For this reason,

i i+2 2

Figure 1.1. Linear B-spline with (a) simple knots, (b) a double knot

Figure 1.2 Quadratic B-spline with (a) simple knots, (b) a triple knot

some call B a linear B-spline. If, e.g., t = t (hence X = 0), but still t < t ,

i2 i i+1 i i+1 i+2

then B consists of just one nontrivial piece and fails to be continuous at the double

i2

knot t = t , as is shown in Fig. 1.1.

i i+1 3

The third-order B-spline is given by

B = ! B + (1 ! )B

i3 i3 i2 i+1;3 i+1;2



= ! ! X + ! (1 ! )+ (1 ! )! X (2:6)

i3 i2 i i3 i+1;2 i+1;3 i+1;2 i+1

+(1 ! )(1 ! )X

i+1;3 i+2;2 i+2

This shows that, in general, B consists of 3 (nontrivial) quadratic pieces, and, to judge

i3

1

from the Fig. 1.2, these seem to join smo othly at the knots to form a C piecewise quadratic

function which vanishes outside the interval [t :: t ). Coincidences among the knots

i i+3

t ;:::;t would change this. If, e.g., t = t = t (hence X = X = 0), then B

i i+3 i i+1 i+2 i i+1 i3

consists of just one nontrivial piece, fails to b e even continuous at the triple knot t ,but

i

1

is still C at the simple knot t , as is shown in Fig. 1.2.

i+3

After k 1 steps of the recurrence, we obtain B in the form

ik

i+k 1

X

B = b X ; (2:7)

ik jk j

j =i

with each b a p olynomial of degree < k since it is the sum of pro ducts of k 1 linear

jk

p olynomials. Thus a B-spline of order k consists of p olynomial pieces of degree

fact, all b are of exact degree k 1.)

jk

Figure 1.3 A 6th order B-spline and the six quintic p olynomials whose

selected pieces makeup the B-spline

From this, we infer that B is a piecewise p olynomial of degree < k which vanishes

ik

outside the interval [t :: t ) and has p ossible breakp oints t ; ;t ; cf. Fig. 1.3. In

i i+k i i+k 4

!

ik

1

1 !

i+1;k

0

t t t t

i i+1 i+k 1 i+k

Figure 1.4 The twoweight functions in (2.4a) are p ositiveon(t ::t )=

i i+k

supp B .

ik

particular, B is just the zero function in case t = t . Also, by induction, B is p ositive

ik i i+k ik

on the op en interval (t ::t ), since b oth ! and 1 ! are p ositive there; cf. Figure

i i+k ik i+1;k

1.4.

Further, we see that B is completely determined by the k + 1 knots t ;:::;t . For

ik i i+k

this reason, the notation

B (jt ;:::;t ) := B (2:8)

i i+k ik

is sometimes used. Other notations in use include



N := B and M := k=(t t ) B : (2:9)

ik ik ik i+k i ik

The many other prop erties of B-splines are derived most easily by considering not

just one B-spline but the linear span of al l B-splines of a given order k for a given knot

sequence t. This brings us to splines.

3. Splines de ned

A spline of order k with knot sequence t is, by de nition, a linear combination

of the B-splines B asso ciated with that knot sequence. We denote by

ik

X

S := f B a : a 2 IR g (3:1)

k;t ik i i

i

the collection of all such splines.

We have left op en so far the precise nature of the knot sequence t, other than to

sp ecify that it b e a nondecreasing real sequence. In any practical situation, t is necessarily 5

t t t t

j k +1 j j +1 j +k

Figure 2.1 The k B-splines whose supp ort contains [t :: t ); here k =3

j j +1

a nite sequence. But, since on any nontrivial interval [t :: t ) at most k of the B

j j +1 ik

are nonzero, viz. B ;:::;B (cf. Figure 2.1), it do esn't really matter whether t is

j k +1;k jk

nite, in nite, or even bi-in nite; the sum in (3.1) always makes p ointwise sense, since, on

any interval [t :: t ), at most k summands are not zero.

j j +1

We will pay sp ecial attention to the following two \extreme" knot sequences, the

sequence

ZZ:=(:::;2; 1; 0; 1; 2;:::)

and the sequence

IB:=(:::;0; 0; 0; 1; 1; 1;: ::):

A spline asso ciated with the knot sequence ZZ is called a cardinal spline. This term

was chosen byScho enb erg [Scho69] b ecause of a connection to Whittaker's Cardinal Series.

This is not to b e confused with its use in earlier spline literature where it refers to a spline

which vanishes at all p oints in a given sequence except for one at which it takes the value

1. The latter splines, though of great interest in spline interp olation, do not interest us

here.

Because of the uniformity of the knot sequence t = ZZ, formulae involving cardinal

B-splines are often much simpler than corresp onding formulae for general B-splines. To

b egin with, al l cardinal B-splines (of a given order) are translates of one another . With

the natural indexing t := i; for all i, for the entries of the uniform knot sequence t =ZZ,

i

we have

B = N ( i); (3:2)

ik k

with

N := B = B (j0;:::;k): (3:3)

k 0k

The recurrence relations (2.4) simplify as follows:

(k 1)N (t)= tN (t)+ (k t)N (t 1): (3:4)

k k 1 k 1 6

Figure 2.2 Bernstein of degree 4 or order 5

The knot sequence t =IB contains just two p oints, viz., the p oints 0 and 1, but each

with in nite multiplicity. The only nontrivial B-splines for this sequence are those which

have both 0 and 1 as knots, i.e., those B for which t =0 and t =1; see Figure 2.2.

ik i i+k

There seems to be no natural way to index the entries in the sequence IB. Instead, it is

customary to index the corresp onding B-splines by the multiplicities of their two distinct

knots. Precisely,

; 1;:::;1 ): (3:5) B := B (j 0;:::;0

(; )

| {z } {z } |

+1 times  +1 times

With this, the recurrence relations (2.4) simplify as follows:

B (t)=tB (t)+(1 t)B (t): (3:6)

(; ) (; 1) (1; )

This gives the formula

 

 + 

 

(1 t) t for 0

(; )



for the one nontrivial p olynomial piece of B ,asoneveri es by induction. The formula

(; )

enables us to determine the smoothness of the B-splines in this simple case: Since B

(; )

vanishes identically outside [0 :: 1], it has exactly  1 continuous derivatives at 0 and

 1 continuous derivatives at 1. This amounts to  smo othness conditions at 0 and

 smo othness conditions at 1. Since the order of B is  +  +1, this is a simple

(; )

illustration of the generally valid formula

#smo othness conditions at knot + multiplicityof knot = order : (3:8) 7

For xed  +  , the p olynomials in (3.7) form the so-called Bernstein basis (for

p olynomials of degree   +  ) and, corresp ondingly, the representation

X

p = B a (3:9)

(; ) (; )

+ =h

is the Bernstein form for the p olynomial p 2  . In CAGD, it is more customary to refer

h

to (3.9) as the Bezier form (for the p olynomial p)or as the Bezier p olynomial or even

the Bernstein-Bezier p olynomial. It may be simpler to use the short term BB-form

instead.

Finally, I intro duce here a simplifying assumption. In the next sections, I de-

velop the basic B-spline theory by studying the spline space S , i.e., the collection of all

k;t

functions s of the form

X

s = B a (3:10)

ik i

i

for a suitable co ecient vector a =(a ).

i

In practice, the knot sequence t is always nite, hence so is the sum in (3.10). This

often requires one to pay sp ecial attention to the limits of that summation. Since I nd

that distracting, I will assume from now on that the knot sequence t is bi-in nite . This

can always be achieved simply by continuing the sequence inde nitely in both directions

(taking care to maintain its monotonicity) and cho osing the additional B-spline co ecients

to be zero.

More than that, I will assume that

t := lim t = 1: (3:11)

1 i

i!1

This assumption is convenient since it ensures that every  2 IR is in the supp ort of some

B-spline.

At times, it will be convenient to assume that

t

i i+k

which can always be achieved by removing from t its ith entry as long as t = t . This

i i+k

do es not change the space S since the only k th order B-splines removed thereby are zero

k;t

anyway. In fact, another way to state the condition (3.12) is:

0

B 6=0 for all i: (3:12 )

ik 8

4. The p olynomials in S

k;t

We show in this section that S contains

k;t

 := the collection of all p olynomials of degree

and give a formula for the B-spline co ecients of p 2  .

We b egin with Marsden's Identity:

Theorem 4. For any  2 IR ,

X

k 1

(  ) = B ( ); (4:1a)

ik ik

i

with

( ):=(t  ) (t  ): (4:1b)

ik i+1 i+k 1

Pro of: We deduce from the recurrence relation (2.4) that, for an arbitrary co ecient

sequence a,

X X



B a = B (1 ! )a + ! a : (4:2)

ik i i;k 1 ik i1 ik i

On the other hand, for the sp ecial sequence

a := ( ):=(t  ) (t  )

i ik i+1 i+k 1

(with  2 IR), we nd for B 6=0, i.e., for t

i;k 1 i i+k 1

 

(1 ! )a + ! a = (1 ! )(t  )+!  (t  ) ( )

ik i1 ik i ik i ik i+k 1 i;k 1

(4:3)

=(  ) ( )

i;k 1

since (1 ! )f (t )+! f (t ) is the straight line which agrees with f at t and t ,

ik i ik i+k 1 i i+k 1

hence must equal f if, as in our case, f is linear. This shows that

X X

B ( )= (  ) B ( );

ik ik i;k 1 i;k 1

hence, by induction, that

X X

k 1 k 1

B ( )= (  ) B ( )= (  ) ;

ik ik i1 i1

P

since ( )= 1 and B =1 (see (2.2)).

i1 i1

i

Remark. There may b e some doubt as to why should b e identically equal to 1.

i1

From the de nition (4.1b), it would app ear that is the pro duct of no factors, hence,

i1

by a standard agreement concerning the empty pro duct, equal to 1. This is the de nition 9

appropriate for use in induction arguments. Indeed, if you consider the co ecients in (4.2)

for k =2 directly, you get

(1 ! ) ( )+ ! ( )= (1 ! )  (t  )+ !  (t  )

i2 i1;2 i2 i2 i2 i i2 i+1

=(  );

which agrees with (4.3) for this case if we set ( )= 1.

i1

Since  in (4.1) is arbitrary, it follows that S contains all p olynomials of degree

k;t

More than that, we can even give an explicit expression for the required co ecients, as

follows.

By dividing (4.1a) by (k 1)! and then di erentiating it with resp ect to  ,we obtain

the identities

k   1

X

(  ) (D ) ( )

ik

= B ;  > 0; (4:4)

ik

(k  )! (k 1)!

i

with Df the derivative of the function f . On using this identity in the Taylor formula

k

k 

X

( )

k 

p = D p( );

(k  )!

 =1

valid for any p 2  , we conclude that any such p olynomial can be written in the form

X

p = B  p ; (4:5a)

ik ik

i

with  given by the rule

ik

k

 1

X

(D ) ( )

ik

k 

 f := D f ( ): (4:5b)

ik

(k 1)!

 =1

Here are two sp ecial cases of particular interest. For p =1, we get

X

1= B (4:6)

ik

i

k 1 k 1

since D =(1) (k 1)!, and this shows that the B form a partition of unity.

ik ik

k 2

Further, since D is a linear p olynomial which vanishes at

ik



t := (t +  + t )=(k 1); (4:7)

i+1 i+k 1

i

we get the imp ortant identity

X



p = B p(t ) for all p 2  : (4:8)

ik 1

i

i 10

Remark. In the cardinal case,

 

i  + k 1

( )=(k 1)! = ; (4:1b)

ik ZZ

k 1

while in the Bernstein-Bezier case,

 

 + 

  

: (4:1b) ( )= ( ) (1  ) =(1) B =

IB

(; ) (;)



5. The pp functions contained in S

k;t

In this section, we show that the spline space S coincides with a certain space of

k;t

pp( := piecewise p olynomial) functions.

Each s 2 S is pp of degree

k;t ik

degree

i i+k

S   : (5:1)

k;t

But S is usually a prop er subspace of  since, dep ending on the knot multiplicities

k;t

#t := #ft : t = t g; (5:2)

i j i j

the splines in S are more or less smo oth, while the typical element of  has jump

k;t

discontinuities at every t .

i

For the precise description, given in Theorem 5 b elow, of the smo othness conditions

satis ed by the elements of S ,we make use of Marsden's Identity, (4.1), since it provides

k;t

us with the B-spline co ecients of various pp functions in S , as follows.

k;t

i4

B

i4

t t t

i i+1 i+4

t = t

i+2 i+3

Figure 5.1 B and ; note the double knot

i4 i4 11

2

Figure 5.2 The summands B (t ) and their sum, (t )

i3 i3 j j

2

Figure 5.3 The summands B (t );i  j; and their sum, (t )

i3 i3 j j +

Since B (t ) 6=0 implies (t )= 0 (see Fig. 5.1), the choice  = t in (4.1) leaves only

ik j ik j j

terms with supp ort either entirely to the left or else entirely to the rightoft ; see Fig. 5.2.

j

This implies (see also Fig. 5.3) that

X

k 1

(t ) = B (t ) (5:3)

j ik ik j

+

ij

with

:= maxf ; 0g (5:4)

+

k 1

the p ositive part of the number , i.e., (t ) is a truncated p ower function of exact

j

+

 1

degree k 1. More than that, since t

i j i+k ik j j

the same observation applied to (4.4) shows that

k 

(t ) 2 S for 1    #t : (5:5)

j k;t j

+

Fig. 5.4 illustrates further the interplay between knot multiplicityand smo othness of

the resulting B-splines byshowing all the relevant B-splines and truncated p ower functions

for a certain knot sequence. 12

Figure 5.4 (a) The six quadratic B-splines for the case of one simple and

one double interior knot; and

(b) the corresp onding truncated power basis.

~

Theorem 5. The space S coincides with the space S of all piecewise p olynomials of

k;t

degree

i i

t .

i

Pro of: Assume without loss of generality (see Sec. 3) that

t

i i+k

~

It is sucient to prove that, for any nite interval I := [a::b], the restriction S of

jI

~

the space S to the interval I coincides with the restriction of S to that interval. The

k;t

latter space is spanned by all the B-splines having some supp ort in I , i.e., all B with

ik

~

(t ;t ) \ I 6= ;. The space S has a basis consisting of the functions

i i+k

jI

k 

k 

( a) ;  =1; ;k; ( t ) ;  =1; ; #t ; for a< t

i i i

+ 13

This follows from the observation that a pp function f with a breakp oint at t which

i

is k 1 #t times continuously di erentiable there can be written uniquely as

i

#t

i

X

k 

( t ) c ; f = p +

i 

+

 =1

with p a suitable p olynomial of degree



functions in (5.6) lies in S , by (5.3) and (5.5), we conclude that

k;t

~

S  (S ) : (5:7)

k;t

jI jI

~

On the other hand, the dimension of S ,i.e.,the number of functions in (5.6), equals the

jI

P

numb er of B-splines with some supp ort in I (since it equals k + #t ), hence is an

i

a

i

upp er b ound on the dimension of (S ) . This implies that equality must hold in (5.7),

k;t

jI

which is what we set out to prove.

Remark. The argument from Linear Algebra used here is the following: Supp ose

that we know a basis, (f ;f ;:::;f ) say, for the linear subspace F , and that we further

1 2 n

know a sequence (g ;g ;:::;g ) whose span, G say, contains each of the f . Then, of

1 2 m i

course, F  G and so

n = dim F  dim G  m:

If we now know, in addition, that n = m, then necessarily F = G. Moreover, then

necessarily dim G = m, i.e., the sequence (g ;g ;:::;g ) must be linearly indep endent

1 2 m

(since it then is minimal ly spanning for G). In our particular situation, this last observation

implies that the set of B-splines having some supp ort in I must be linearly indep endent

over I . We pick up on this in the next section.

Remark. Formula (5.3) provides all the information needed to deduce the divided-

+

di erence formulation for B-splines. By de ning to b e the function which agrees with

ik

the p olynomial on (1 :: ) and is identically zero on [ ::1), where  is an arbitrary

ik i i i

p oint in the supp ort of B , i.e., in (t :: t ), we are entitled to write (5.3) in the form

ik i i+k

X

k 1 +

0

(t t ) = B (t) (t ); all t: (5:3 )

j ik j

+

ik

i

+

The function agrees with at all t with j

ik j

ik

at all t with j >i. Since both and 0 are p olynomials of degree

j ik

+ +

the k th divided di erence [t ;:::;t ] at the p oints t ;:::;t of mustbezeroin

j j +k j j +k

ik ik

0

case j 6= i. Therefore, applying this divided di erence to b oth sides of (5.3 ), we nd that

k 1 + +

[t ;:::;t ](t ) = B (t)[t ;:::;t ] . Since agrees at t ;:::;t with the

j j +k jk j j +k j j +k

+

jk jk

k th degree p olynomial ((t )=(t t )) , and this p olynomial has leading co ecient

j j +k j jk

k 1

(1) =(t t ), it follows that

j +k j

k 1

(t t )[t ;:::;t ]( t) = B (t): (5:8)

j +k j j j +k jk

+ 14

6. `B' stands for `BASIC'

In this section, we discuss the basis prop erty of the B-splines, as a consequence of

Theorem 5 and its pro of.

From the Remark following Theorem 5, we obtain the following sharpening of Theo-

rem 5.

Theorem 6. Let I := [a::b) be a nite interval. Then the restrictions

fB : B 6=0g (6:1)

ik jI ik jI

of those B-splines whichhave some supp ort on I form a basis for the space of pp functions

of degree

i i i

di erentiable at each of their breakp oints t .

i

We conclude that the numb er of smo othness conditions at a knot t guaranteed to b e

i

satis ed by every spline in S equals k #t . This proves the formula

k;t i

#smo othness conditions at knot + multiplicityof knot = order (3:8)

cited earlier (in connection with the Bernstein-Bezier form).

It is worthwhile to think ab out this the other way around. Supp ose we start o with

a partition

a =:  < <  < < := b

1 2 ` `+1

of the interval I := [a::b]and wish to consider the space





of all pp functions of degree < k on I with breakp oints  which satisfy  smo othness

i i

conditions at  , i.e., are  1 times continuously di erentiable at  ; for all i. Then a

i i i

B-spline basis for this space is provided by (6.1), with the knot sequence t constructed

from the breakp oint sequence  in the following way: To the sequence

(  ;:::; ;  ;:::; ;:::;  ;:::; ); (6:2)

2 2 3 3 ` `

| {z } {z } {z } | |

k  terms k  terms k  terms

2 3

`

adjoin at the b eginning k points  a and at the end k points  b. While the knots in

(6.2) have to be exactly as shown to achieve the sp eci ed smo othness at the sp eci ed

breakp oints, the 2k additional knots are quite arbitrary. They are often chosen to equal a

resp. b, and this has certain advantages (among other things that of simplicity). With such

a choice, it is necessary to mo dify the de nition (2.1) so as to include the right endp oint,

b, into the supp ort of the rightmost nontrivial B . In other words, if n is such that

i1

t

n n+1

then



1; if t  t  b

n

B (t):= X (t):= (6:3)

n1 n

0; otherwise.

This ensures that, in evaluating a spline or its derivatives at b, we obtain the limit from

the left.

The identi cation of S with a certain space of pp functions allows the following

k;t

conclusions of imp ortance in calculations to be discussed later. 15

Corollary 1. If t < t , then the derivative of a spline in S is a spline of degree

i i+k 1 k;t

k;t k 1;t

Pro of: By assumption, #t < k , hence the pp functions in S are continuous,

i k;t

therefore di erentiable (if we accept a p ossible jump at t in the derivative Ds of s 2 S

i k;t

in case #t = k 1). Further, such a derivative Ds is pp of degree < k 1 and satis es

i

k #t 1 smo othness conditions at t , hence b elongs to S , by Theorem 5 or 6.

i i k 1;t

b

Corollary 2. If t is a re nement of the knot sequence t, then S  S .

k;t

b

k;t

b

Pro of: Since t is a re nement of t, i.e., contains entries in addition to those of t,

the pp functions in S satisfy all the conditions which, by Theorem 5 or 6, characterize

k;t

the pp functions in S . (But the converse do es not hold, since the pp functions in S

b b

k;t k;t

may have more breakp oints and/or may be less smo oth at some breakp oints than the pp

functions in S .)

k;t

These corollaries point out that it should be p ossible, in principle, to compute from

the B-spline co ecients of a spline in S the B-spline co ecients of its derivative and its

k;t

B-spline co ecients with resp ect to a re ned knot sequence. To carry out such calculations,

though, we need a means of expressing the B-spline co ecients of a spline in terms of other

information, suchasitsvalues and derivatives at certain p oints. If the spline happ ens to b e

a p olynomial, then such a formula is provided by (4.5). We show in the next section that

the same formula works for any spline (provided we are willing to restrict the parameter

 suitably).

7. The dual functionals

In this section, we prove that the formula (4.5) for the B-spline co ecients of a

p olynomial is valid for an arbitrary spline provided we restrict the parameter  in the

de nition

k

 1

X

(D ) ( )

ik

k 

D f ( ) (4:5b)  : f 7!

ik

(k 1)!

 =1

to the supp ort of B .

ik

For this, we agree, consistent with (2.1b), that all derivatives in (4.5b) are to b e taken

as limits from the right in case  coincides with a knot (except, p erhaps, when  is the

right endp oint of the interval of interest, see (6.3)).

Theorem 7. If  in de nition (4.5b) of  is chosen in the interval [t :: t ), then

ik i i+k

 

X

B a  = a : (7:1)

jk j ik i

j 16

p

l2

p

l

t t

l l+1

p

l1

Figure 7.1 The three p olynomials, p ;p ;p , which agree with some

l2 l1 l

quadratic B-spline B on the knot interval [t :: t ).

j 3 l l+1

Pro of: We prove that, under the given restriction,



1; if i = j ;

 B =  := (7:2)

ik jk ij

0; otherwise.

Assume that  2 [t ::t )  [t ::t ). Then (7.2) requires pro of only for j = l k +1;:::;l

l l+1 i i+k

since, for all other j , i 6= j and B vanishes identically on [t ::t ), hence also  B =0.

jk l l+1 ik jk

For each of the remaining j 's, let p b e the p olynomial which agrees with B on [t ::t );

j jk l l+1

see Fig. 7.1. Then

 B =  p :

ik jk ik j

On the other hand,

l

X

p = p  p ; (7:3)

j i ik j

i=lk +1

since this holds by (4.5a) on [t :: t ). This forces  p , hence  B , to equal  for

l l+1 ik j ik jk ij

i; j = l k +1;:::;l, since, by Theorem 6 or directly from the fact that (4.5a) holds for

every p 2  , the sequence

p ; ;p (7:4)

lk +1 l

is linearly indep endent.

Remark. The argument used here is that, for a linearly indep endent sequence

(f ;:::;f ), the only way the equation

1 n

n

X

f = f a

i j ij

j =1 17

can hold is for a to equal 1 for i = j and zero otherwise. Further, the linear indep endence

ij

of the sequence (7.4) follows from the validity of (4.5a) for every p 2  since that implies

that the k sequence (7.4) is spanning for the k dimensional space  . It also follows

from Theorem 6 with I =[t :: t ).

l l+1

 

The two sequences, B and  , are said to b e bi-orthonormal or dual to each

ik jk

other because they satisfy (7.2). For this reason, the linear functionals  are at times

ik

referred to as the dual functionals for the B-splines.

We exploit the simple formula (7.1) for the ith B-spline co ecient of a spline in

subsequent sections, in order to derive algorithms for di erentiation and knot insertion and,

ultimately, to derive statements ab out the condition and the shap e-preserving prop ertyof

B-splines.

0

100 101

Figure 8.1 The power co ecients of these two very di erent linear poly-

nomials di er by only 0.01%.

8. Condition

The condition of a basis measures how closely relativechanges in the co ecients are

matched by the resulting relativechanges in the element represented. The closer the match,

2

the b etter conditioned the basis is said to b e. For example, the p ower basis 1;t;t ;::: is not

a good waytorepresent p olynomials if we are interested in a p ositiveinterval [a::b] with

a=b close to 1. If, e.g., [a::b]= [100:: 101], then a 0.01% change in the power co ecients

of the straight line p : t ! t 100 (to p : t ! 1:01t 100) can change its behavior on

[100 :: 101] by 100%; see Fig. 8.1.

If we use the appropriately shifted power basis, e.g., write p in the form p(t) =

+ (t 100), then a .01% change in the co ecients ; of this form pro duces a .01%

change in the p olynomial on the interval [100 ::101]. The appropriately shifted p ower basis 18

is often much b etter conditioned than the power basis. In this section, we discuss brie y

the condition of the B-spline basis.

This requires us to b ound the spline in terms of its B-spline co ecients and the B-

spline co ecients in terms of the spline. The rst turns out to be easy, while the second

requires some work. Precisely, we are lo oking for constants m > 0 and M for which the

inequalities

X

m max ja jmax j B (t)a j M max ja j (8:1)

i ik i i

t

i i

i



hold regardless of what the co ecient vector a = a might be. Since the B-splines are

i

nonnegative and sum to 1 at any point, we have

X X X

j B (t)a j B (t)ja j B (t)maxja j = max ja j;

ik i ik i ik i i

i i

i i i

hence the second inequality always holds with M =1. For the rst inequality, we have to

work a little harder.

P

Set s := B a . We know from Theorem 7 that

ik i

i

k

 1

X

(D ) ( )

ik

k 

a =  s = D s( ) (8:2)

i ik

(k 1)!

 =1

with  some p oint which we can freely cho ose in the interval [t :: t ). We now b ound

i i+k

this sum in terms of max js(t)j.

t

Supp ose that  2 [t :: t )  [t :: t ). Then, for some const dep ending only on

l l+1 i i+k k

k , and for all p 2  and all j ,

j j

jD p( )j const (t ) max jp(t)j: (8:3)

k l

t tt

l l+1

The existence of such a const follows for the case t = 1 from the fact that  is

k l

nite-dimensional, and from this it follows for arbitrary t by scaling. Since s agrees

l

with some p olynomial of degree

l l+1

j j

jD s( )j const (t ) max js(t)j: (8:4)

k l

t tt

i

i+k

On the other hand, =(t ) (t ) is also a p olynomial of degree

ik i+1 i+k 1

k 1 0



j (8:5) max j (t)j const jt

ik l

k

t tt

l l+1

0

 

for some const which dep ends only on k and with [t :: t ) a largest interval of that

l l +1

k



form in [t :: t ). Therefore we cho ose l = l and then obtain, from (8.3) with p =

i i+k ik

and from (8.4), the bound

 1 k  2 0

jD ( )D s( )j (const ) const max js(t)j:

ik k

k

t tt

i

i+k

Now sum these bounds over  and divide by (k 1)! to obtain

ja j = j sj const max js(t)j;

i ik

t tt

i

i+k

with const dep ending only on k .

We have proved the following 19

Theorem 8. There exists a constant D dep ending only on k so that, for all knot se-

k

quences t and all s 2 S , and for all i,

k;t

j sj D max js(t)j: (8:6)

ik k

t tt

i

i+k

The best value for D is not known exactly but there is strong numerical evidence

k

k 1

that D  2 . If we only consider cardinal splines, i.e., only uniform knot sequences,

k

k

then the b est value for D is known to be less than (=2) .

k

Corollary. The inequalities (8.1) hold with m =1=D and M =1.

k

9. Evaluation

In this section, we discuss the use of the recurrence relations (2.4) for the evaluation

of a spline

X

s = B a (9:1)

ik i

i

from its B-spline co ecients (a ).

i

We already observed in (4.2) that the recurrence relations imply

X X

[1]

; (9:2) s = B a = B a

ik i i;k 1

i

i i

with

[1]

a := (1 ! )a + ! a : (9:3)

ik i1 ik i

i

[1]

Note that a is not a constant, but is the straight line through the p oints (t ;a ) and

i i1

i

[1]

(t ;a ). In particular, a (t) is a convex combination of a and a if t  t  t .

i+k 1 i i1 i i i+k 1

i

After k 1-fold iteration of this pro cedure, we arrive at the formula

X

[k 1]

; s = B a

i1

i

i

which shows that

[k 1]

on [t ;t ): s = a

i i+1

i

[0]

:= a ; i = j k +1;:::;j, (which Algorithm 9. From given constant p olynomials a

i

i

P

[r ]

;r =1;: : : ;k 1, by the determine s := B a on [t :: t )), generate p olynomials a

ik i j j +1

i

i

recurrence

[r +1] [r ] [r ]

a := (1 ! )a + ! a ; j k + r +1

i;k r i;k r

i i1 i 20

[k 1]

Then s = a on [t :: t ). Moreover, for t  t  t , the weight ! (t) in (9.4)

j j +1 j j +1 i;k r

j

[k 1]

lies between 0 and 1. Hence the computation of s(t) = a (t) via (9.4) consists of the

j

rep eated formation of convex combinations.

In the cardinal case (see Sec. 3, esp. (3.2-4)), the algorithm simpli es, as follows. Now

X X

[1]

s =: N (i)a = N ( i)a =(k 1);

k i k 1

i

i i

with

[1]

a := (i + k 1 )a +( i)a :

i1 i

i

Hence

[k 1]

s = a =(k 1)! on [j::j+1);

j

with (9.4)

ZZ

[r 1] [r 1] [r ]

; j k + r

i i1 i

In the Bernstein-Bezier case (see Sec. 3, esp. (3.5-9)), all the nontrivial weight func-

tions ! are the same, i.e.,

i;k r

! (t)= t:

i;k r

Thus, for

X

s = B a ;

(; ) (; )

+ =h

we get

s = a on [0 :: 1];

(0;0)

with (9.4)

IB

a (t)= (1 t)a + ta ;  +  = r ; r = h 1;:::;0:

(; ) (+1; ) (; +1)

This is de Casteljau's Algorithm for the evaluation of the BB-form.

10. Di erentiation

In this section, we derive a formula for the B-spline co ecients of the derivative of a

spline in terms of the B-spline co ecients of the spline.

By Corollary 1 to Theorem 6, the derivative Ds of a spline s 2 S is again a spline

k;t

with the same knot sequence but of one order lower. This means that, by Theorem 7, we



0

can compute its B-spline co ecients a by the formula

i

0

=  (Ds) a

i;k 1

i

provided we use  2 [t :: t ).

i i+k 1 21

0

To relate a to a, we express  D as a linear combination of the functionals  ,

i;k 1 ik

making use of the fact that  depends linearly on ,{ recall the de nition

ik ik

k

 1

X

(D ) ( )

ik

k 

 : f 7! D f ( ); (4:5b)

ik

(k 1)!

 =1

{ and that

(t t ) = : (10:1)

i+k 1 i i;k 1 ik i1;k

These facts imply that



k

 1

X



(D ) ( )

ik i1;k

k 

f ( )=   D f ( )

ik i1;k

(k 1)!

 =1

k 1

 1

X

(D ) ( )

i;k 1

k 

=(t t ) D f ( );

i+k 1 i

(k 1)!

 =1

k 1

the last equality by (10.1) and since D = 0. On the other hand, directly from

i;k 1

the de nition (4.5b),

k 1

 1

X

(D ) ( )

i;k 1

k 1

 Df ( )= D Df ( )

i;k 1

(k 2)!

 =1

k 1

 1

X

(D ) ( )

i;k 1

k 

=(k 1) D f ( ):

(k 1)!

 =1

Comparison of these two displays shows that

 

k 1

  : (10:2)  D =

ik i1;k i;k 1

t t

i+k 1 i

Assuming that B 6= 0, i.e., that t < t , we can cho ose  2 (t :: t ) =

i;k 1 i i+k 1 i i+k 1

(t :: t ) \ (t :: t ). This yields

i1 i+k 1 i i+k

P P

0

Algorithm 10. Compute the co ecients for a B := D a B by

i;k 1 i ik

i

a a

i i1

0

; if t

i i+k 1

i

(t t )=(k 1)

i+k 1 i

Remark. What happ ens when t = t ? In this case, B =0,hence there is

i i+k 1 i;k 1

P

0

B a may not even . Tobe precise, in this case, the spline s = no need to calculate a

ik i

i

i

be continuous at t , therefore (Ds)(t ) makes no sense. On the other hand, the left and

i i

the right limit, (Ds)(t ) and (Ds)(t +), always make sense, and the algorithm provides

i i

0

all the a 's needed for their calculation.

j 22

By applying the algorithm to the particular co ecient sequence a =( ), we obtain

ij

the formula

k 1 k 1

DB = B B : (10:4)

ik i;k 1 i+1;k 1

t t t t

i+k 1 i i+k i+1

In terms of the alternative notations (2.9) for B-splines, this reads



DB = DN = M M :

ik ik i;k 1 i+1;k 1



P P

From this, we infer that D N = M M . Since N = 1, this

ik ;k 1 +1;k 1 ik

i= i

implies that

Z Z

t 1

i+k 1

M = M =1 (10:5)

i;k 1 i;k 1

t 1

i

and so indicates why the particular normalization

k

B M :=

ik ik

t t

i+k i

is of interest.

In the cardinal case, (10.3) reduces to

0

a = a a =: ra (10:3)

i i1 i ZZ

i

and (10.4) reads

DN = N N (1): (10:4)

k k 1 k 1 ZZ

On integrating this formula, we obtain

Z

t

N (t)= N ( )d (10:6)

k k 1

t1

since both sides of (10.6) vanish for negative t. In terms of the convolution pro duct

Z



f  g (t):= f (t  )g ( )d

of two functions f and g , this gives the imp ortant formula

N = N  N : (10:7)

k 1 k 1

This shows that N is the k fold convolution pro duct of N , i.e.,

k 1

N = N  N    N :

k 1 1 1

| {z }

k terms

In the Bernstein-Bezier case, we get

X X

D B a = B a (10:4)

IB

(; ) (; ) (; ) (; )

+ =h + =h1

with



a =( +  +1) a a : (10:3)

IB

(; ) (; +1) (+1; ) 23

11. Knot insertion

In this section, we discuss the most imp ortant CAGD contribution to (univariate)

spline theory, viz., the idea of knot insertion (a.k.a. sub division), particularly as intro duced

and practiced by Bo ehm; see [BBB87] for such things as the Oslo algorithm. Since the

spline order, k , will not change in this section, we will usually suppress it and write B

i

instead of B , instead of , etc.

ik i ik

Simply put, knot insertion involves rewriting a given spline as a spline with a re ned

knot sequence, as can always be done by Corollary 2 of Theorem 6. Such a calculation is

worthwhile since the B-spline co ecients are nearly equal to values of the spline at known

p oints, and this is more nearly so when the knots are closer together. Here is the precise

statement.

P

Theorem 11. If the spline s = B a is continuously di erentiable, then

i i

i

 2 2

ja s(t )j const jtj sup jD s(t)j; (11:1)

i

i

t

with



t := (t + t +  + t )=(k 1) (4:7)

i+1 i+2 i+k 1

i

and

jtj := sup (t t ):

i+1 i

i

Pro of: Recall from Sec. 8 that

js(t)j: (8:6) ja j = j sj const max

i i

t tt

i

i+k

Further, recall from Sec. 4 (esp. (4.8)) that



 p = p(t ) for all p 2  :

i 1

i

  

), i.e., the linear Taylor p olynomial )Ds(t )+(t Thus, cho osing, in particular, p := s(t

i i i



for s at t , we get

i

 

ja s(t )j = ja p(t )j = j (s p)j const max j(s p)(t)j

i i i

i i

t tt

i

i+k

2

(t t )

i+k i

2

 const max jD s(t)j: jjj

t tt

8

i

i+k

This suggests consideration of the control p olygon (see Fig. 11.1 for an example)

P

asso ciated with the representation B a of the spline s as an elementof S . This control

i i t

i

p olygon will be denoted by

C :

a;t



It is the broken line or piecewise linear function with vertices P := (t ;a ). For, the

i i

i

theorem implies that the control p olygon will be close to s if jtj is small. Here is the

precise statement. 24

Figure 11.1 A cubic spline and its control p olygon. The end knots are

quadruple.

P

Corollary. Let C be the control p olygon asso ciated with the representation B a of

a;t i i

i

the continuous spline s as an element of S . Then

t

2 2

sup js(t) C (t)j const jtj sup jD s(t)j: (11:2)

a;t

t t

 

Pro of: Let t  t  t and let p be the linear p olynomial which agrees with s at

i i+1

 

t and t . Then

i i+1

  2 2

js(t) p(t)j jt t j =8 max jD s( )j;

i+1 i

 

t  t

i i+1

while

  2 2

jp(t) C (t)j maxfjs(t ) a j; js(t ) a jg  const jtj max jD s( )j

a;t i i+1

i i+1



by the theorem.

This shows that the control p olygon C converges to the spline s as we re ne the

a;t

knot sequence t. This is illustrated in Fig. 11.2. Since the typical graphical equipmentonly

draws broken lines, anyway, this makes it attractiveto construct re ned control p olygons

for a spline.

For this, we need to know how to compute, from its B-spline co ecients a as an

i

element of S , the B-spline co ecients ba for the spline s with resp ect to a re ned knot

t i

b

b

sequence t. By Theorem 7, this is a question of comparing the corresp onding  with  .

i i

Since the dual functional

k

 1

X

(D ) ( )

i

k 

 : f 7! D f ( ) (4:5b)

i

(k 1)!

 =1

dep ends linearly on , this requires nothing more than to express

i

b

b b

=(t ) (t )

i i+1 i+k 1 25

Figure 11.2 The control p olygon of Fig. 11.1 and three midp oint re ne-

ments.

as a linear combination of the .

i

b

This is particularly easy when t is obtained from t by adding just one knot, say the

b

p oint t. Then



b

; t  t;

i i+k 1

b

=

i

b

; t  t ,

i1 i

b

hence there is some actual computing necessary only for t < t

i i+k 1

 

+ =(t ) (t ) (t )+ (t )

i1 i i+1 i+k 2 i i+k 1

b

=

i

b

provided (t )+ (t )= (t ), i.e.,

i i+k 1

b b

=1 ! (t) and = ! (t):

i i

b b b

Since t = t < t< t = t , we can cho ose  in the de nition (4.5b) in the interval

i i i+k 1 i+k

b b

(t :: t )=(t :: t ) \ (t :: t ). This proves

i i+k i1 i+k 1 i i+k 26

b

Algorithm 11. If the knot sequence t is obtained from the knot sequence t by addition

b

of the p oint t, then the co ecients ba for the spline s with resp ect to the re ned knot

i

sequence are given by

8

b

<

a ; if t  t;

i i+k 1

b b b

(11:3) ba =

(1 ! (t))a + ! (t)a ; if t < t< t ;

i

i i1 i i i i+k 1

:

b

a ; if t  t .

i1 i

b b

Observe that ! (t) 2 [0 :: 1] when t < t < t , and thus the co ecients ba are

i i i+k 1

convex combinations of the co ecients a.

This algorithm has the following very pretty graphical interpretation.

Corollary. The re ned control p olygon C can be thought of as having been obtained

b

ba;t

by interp olation at its vertices to the original control p olygon C , i.e.,

a;t

 

b b

C (t )=C (t ) for all i: (11:4)

a;t

i i

b

ba;t

Pro of: Consider the straight line p : t 7! t. It is a spline and, by (4.8),

X



p = B t ;

i

i

i





i.e., t is its B-spline co ecient sequence with resp ect to the knot sequence t. In partic-

i



ular, it is its own control p olygon, i.e., C = p, regardless of what the knot sequence t

t ;t



might be. This implies that (11.3) also holds with every a replaced by t .



b

b

This says that the p oint P := (t ; ba ) lies on the segment [P :: P ] and cuts this

j j j 1 j

j

b b

segment in the ratio (t t ):(t t ). This is illustrated in Figure 11.3 for the control

j j +k 1

p olygon of Figure 11.1.

b b

If r := #t  k 1, then, after just (k 1 r )-fold insertion of t, we obtain a knot



b

sequence t in which the number t o ccurs exactly k 1 times (see Fig. 11.4 for an example).

This means that there is exactly one B-spline for that knot sequence which is not zero at

b b b

t. Hence it must equal 1 at t and its co ecient must provide the value of s at t. This

makes it less surprising that the calculations in Algorithms 9 and 11 are identical.

Figure 11.5 Conversion to BB-net by (k 2)-fold insertion of each knot 27

t t

b

j +2 j 1

t

P

j 1

t t

j +1 j

b

P

b

j

t

b

t

t t

j 2 j +3

P

j

b

Figure 11.3 Insertion of t =2 into the knot sequence

t = (0,0,0,0,1,3,5,5,5,5), with k =4.

Figure 11.4 The cubic spline and its control p olygon from Figure 11.1 and

the sequence of control p olygons generated by three-fold inser-

tion of the same knot. (The nest control p olygon di ers from

its predecessor only by an additional vertex point.)

Conversion to BB-net Let t be the re ned knot sequence which contains each of

the knots in t exactly k 1 times (see Fig. 11.5 for an example). Then each corresp onding B-

B is nonzero on just one knot interval, hence coincides there with a prop erly shifted spline

jk

and scaled element of the Bernstein basis. The k B-spline co ecients a asso ciated in

j 28

this way with a knot interval therefore provide the co ecients in the BB-form for the

p olynomial with which the spline agrees on that knot interval. The co ecient sequence

( a ), or the control p olygon C , are called the BB-net for the given spline. It can be

i

a;t

obtained by inserting each knot t of the spline k 1 #t times. The pro cess can be

i i

sp eeded up slightly by inserting rst every other knot, and, in a second round, inserting

the remaining knots. The latter insertion pro cess is then entirely lo cal and dep ends only

on the ratio of the two knot intervals containing the knot being inserted.

While the formulas do simplify for the cardinal case, they are not of much use in that

form since insertion of one knot into the sequence t=ZZ would destroy the uniformity of

the knot sequence. But it makes good sense to develop formulas for inserting the same

numb er of uniformly spaced knots into every interval [i: :i+ 1] since this pro duces again a

uniform knot sequence. Because of its practical imp ortance, wetreatthis case separately,

in the next section.

12. Knot insertion for cardinal splines

In this section, we consider knot re nement for cardinal splines, i.e., splines with

a uniform knot sequence. Here it is desirable to have the re ned knot sequence again

uniform. We restrict attention to the case that the given knot sequence is t=ZZ. This is

no real restriction since an arbitrary uniform knot sequence can always be written in the

form + ZZ for appropriate scalars and , and if s is a spline with that knot sequence,

then s( + ) is a spline with the knot sequence ZZ.

If we insert m 1 uniformly spaced knots into every knot interval of ZZ, then the

1

b

b

re ned knot sequence is t = m ZZ. The corresp onding B-splines B are

i

b b

B = N (i=m);

i k

with

b

N (t):= N (mt)

k k

an appropriately scaled version of the standard cardinal B-spline N . This makes it trivial

k

to determine ba in case k =1. Since

i

b b b

N = N + N ( 1=m)+  + N ( (m 1)=m); (12:1)

1 1 1 1

we nd for this case that

ba = a for j =0;:::;m 1:

mi+j i

The formula for general order k is obtained from this with the aid of the convolution

formula

N = N  N (10:7)

k 1 k 1

from Sec. 10, as follows. We de ne

X X

b

N ( i)a ; r =1;:::;k: (12:2) N (i)a =: s :=

r mi;r r i r

1

i2ZZ

i2m ZZ 29

Then ba = a ,and, from (10.7) and (12.1),

i i;k

m1

X X

b b

s = N  s = N (j=m)  N ( i)a

r +1 1 r 1 r mi;r

1

j =0

i2m ZZ

m1

X X

b b

= N ( j=m)  N ( i) a

1 r mi;r

| {z }

1

j =0

i2m ZZ

b

N ( i j=m)=m

r +1

m1

X X

b

N (i)=m a : =

r +1 mij;r

1

j =0

i2m ZZ

Here, we have used the following consequence of the convolution formula (10.7):

Z

b b

N ( )  N ( )= N (m(  ))N (m( ))d

1 r 1 1 r 1

Z

= N (m( )  )N ( )d =m

1 r 1

b

= N ( )=m:

r

We conclude that

a := (a + a +  + a )=m; for r>0: (12:2)

i;r +1 i;r i1;r im+1;r

(The ab ove argument was corrected 05 mar 96.) Here is the full algorithm.

Algorithm 12. Given the B-spline co ecients a = (a ) of s 2 S , its B-spline co ef-

i k;ZZ

1

cients ba = (ba ) with resp ect to the re ned knot sequence m ZZ can be computed as

i

follows:

a := a ; j =0;:::;m 1;

mi+j;1 i

m1

X

a = a =m; r =2;:::;k;

i;r ij;r 1

j =0

ba := a :

i i;k

In practice, one would use the algorithm rep eatedly with m = 2 rather than once with

a larger m. For, the computational cost is

nm(k 1)((m 1)A + D );

with n the number of co ecients to start with, and A and D the cost of one addition,



resp ectively division. If, e.g., the targeted re nement is to have 2 n co ecients, then the 30



cost ratio of the choice m =2 versus the use of  applications of the algorithm, each time

with m =2, is

 

2 ((2 1)A + D )

1

 2 A + D=2:

2 

(2 + 2 +  +2 )(A + D )

In addition, even though the rep eated application, with m = 2, takes roughly twice as

many divisions, these are just divisions by 2.

13. Shap e preservation

In this section, we use knot insertion to prove the shap e preserving prop erty of B-

splines. Roughly sp eaking, this prop erty says that a spline has the same shap e as its

control p olygon. Fig. 13.1 illustrates the mathematical formulation of shap e preservation,

i.e., the fact that any straight line crosses the spline no more often than it crosses the

control p olygon.

Figure 13.1 A cubic spline, its control p olygon, and various straight lines

intersecting them. The control p olygon exaggerates the shap e

of the spline. The spline crossings are bracketed by the control

p olygon crossings. 31

We b egin with the

Convex hull prop erty. If t  t < t , then s(t) is a convex combination of the k

j j +1

B-spline co ecients a ;:::;a .

j k +1 j

which follows from Algorithm 9 or directly from the facts that B-splines are nonnegative

(Sec. 2) and add up to 1 at every p oint (see (4.6)).

For a statement of the full shap e preserving prop erty, we recall that

S (a)

is the standard notation for the number of (strong) sign changes in a sequence a. Thus

S (1; 1; 1; 1) = 3; S (1; 0; 1; 1) = 1; S (0; 0; 0; 0) = 0:

Theorem 13. Variation diminution. S (s)  S (a); i.e., with x <  < x arbi-

1 r

trary,



S s(x );:::;s(x )  S (a):

1 r

Pro of. Recall from Sec. 11 that s(x );:::;s(x ) is a subsequence of the sequence a

1 r



of co ecients for s with resp ect to the re ned knot sequence t which contains each x at

i

least k 1 times. Hence it is sucient to prove that S (a)  S (a). But this follows once

weknowthatS (ba)  S (a), with ba obtained by (11.3), i.e., by insertion of just one knot.

For this simple case, though, the conclusion is immediate if we think of the construction of

ba from a as o ccurring in two steps: In the rst step, we insert ba between a and a , and

i i1 i

this do es not increase the number of sign changes since each ba is a convex combination

i

of its neighb ors a and a in that new sequence. In the second step, we pull out ba as a

i1 i

subsequence, and this mayonly lower the number of sign changes.

Corollary. Shap e preservation. A spline crosses any straight line no more often than

do es its control p olygon. In particular, if the control p olygon is monotone (convex), then

so is the spline.

Pro of: Let s be the spline and p the straight line. Then S (s p) is the number

of times the spline crosses the straight line. Since s p is a spline, this is b ounded by

S (a b), with a; b the B-spline co ecients of s, resp. p with resp ect to t, and this equals

the number of times the control p olygon C crosses the control p olygon for p. But, as

a;t

we observed in Sec. 11, the control p olygon for the straight line p is p itself. This proves

the general statement.

For the particulars, recall that a (continuous) function is monotone if and only if it

crosses any constant function at most once, and that a function is convex if it crosses any

straight line at most twice (dipping rst below and then rising ab ove the line in case it

crosses it twice). 32

14. Background

This essay is a slight reworking (and correction) of the lecture notes for the rst of

four lectures in the course entitled \The extension of B-spline curve algorithms to surfaces"

given at SIGGRAPH'86. That lecture was solidly based on [BH87] which covers more or

less the same material, in a less elab orate way and without any gures, in just seven pages.

The relevant literature on (univariate) B-splines up to ab out 1975 is summarized in

[B76] which also contains hints of the most exciting developments concerning B-splines

since then: knot insertion and the multivariate B-splines. The two b o oks on splines, [B78]

and [Schu81], which have app eared since 1975, cover B-splines in the traditional way. As

presentations of splines from the CAGD p ointofview,thesurvey article [BFK84] and the

\Killer B's" [BBB85,87] are particularly recommended.

I refer you to these references and to the original pap ers referred to there if you are

curious ab out just who contributed (and when and how) to the material essayed here.

The author welcomes comments ab out this article, particularly concerning misprints,

at the address [email protected].

Added 05mar96: Corrected various errors in the argument for Algorithm 12.

Added 03jun96: Corrected some misp ellings and adjusted gure scaling to current

dvips.

Added 06jun96: Corrected a misprint and adjusted to use of current T X macro

E

le.

Added 12feb,2-4mar98: Corrected a misprint in display before (10.2), replaced

+

1

), ZZ=m by m ZZ, corrected a misstatement on page 14 (concerning the de nition of

ik

and a misleading statement on page 12. Also, corrected (6.3), some of the p ercentages on

page 18, and (10.3) .

IB

REFERENCES

[BBB85] R. H. Bartels, J. C. Beatty and B. A. Barsky (1985), An Intro duction to the Use of

Splines in , SIGGRAPH'85, San Francisco.

[BBB87] R. H. Bartels, J. C. Beatty and B. A. Barsky, An Introduction to Splines for Use in

Computer Graphics & Geometric Modeling, Morgan Kaufmann Publ., Los Altos CA

94022, 1987.

[BFK84] W. Bohm, G. Farin and J. Kahmann (1984), A survey of curve and surface metho ds

in CAGD, Computer Aided 1, 1{60.

[B76] C. de Bo or (1976), Splines as linear combinations of B-splines, in Approximation

Theory II, G. G. Lorentz, C. K. Chui and L. L. Schumaker eds., 1{47.

[B78] C. de Bo or (1978), A Practical Guide to Splines, Springer-Verlag, New York.

[BH87] C. de Bo or and K. Hollig (1987), B-splines without divided di erences, in Geometric

Modeling, G. Farin ed., SIAM, 21{27.

[Scho69] I. J. Scho enb erg (1969), Cardinal interp olation and spline functions, J. Approximation

Theory 2, 167{206. 33

[Schu81] L. L. Schumaker (1980), Spline Functions,J. Wiley, New York. 34