Explicit matrix representation for NURBS curves and surfaces Ligang Liu

advertisement
Computer Aided Geometric Design 19 (2002) 409–419
www.elsevier.com/locate/comaid
Explicit matrix representation for NURBS curves and surfaces
Ligang Liu a,b , Guojin Wang a,b,∗
a State Key Lab of CAD&CG, Zhejiang University, Hangzhou 310027, PR China
b Institute of Computer Images and Graphics, Zhejiang University, Hangzhou 310027, PR China
Abstract
The matrix forms for curves and surfaces were largely promoted in CAD/CAM. In this paper we have presented
two matrix representation formulations for arbitrary degree NURBS curves and surfaces explicitly other than
recursively. The two approaches are derived from the computation of divided difference and the Marsden identity
respectively. The explicit coefficient matrix of B-spline with equally spaced knot and Bézier curves and surfaces
can be obtained by these formulae. The coefficient formulae and the coefficient matrix formulae developed in this
paper express non-uniform B-spline functions of arbitrary degree in explicit polynomial and matrix forms. They
are useful for the evaluation and the conversion of NURBS curves and surfaces in CAD/CAM systems.  2002
Elsevier Science B.V. All rights reserved.
Keywords: Computer-aided design; NURBS curve; NURBS surface; Coefficient matrix; Explicit representation
1. Introduction
The non-uniform rational B-spline (NURBS) curves and surfaces have been widely applied in many
CAD/CAM systems. They are gaining popularity and have become a standard tool in industry of
geometric modeling because they provide a common mathematical form for analytical geometry and
free-form curves and surfaces (Piegl and Tiller, 1997).
Traditionally, de Boor–Cox recursive algorithm (de Boor, 1972) has been used for the evaluation
of B-spline function and its derivatives. Another approach for evaluating NURBS curves and surfaces
is to decompose them into their Bézier components using knots insertion algorithms (Böhm, 1980;
Cohen et al., 1980). These methods are not efficient enough since we must repeatedly execute the
recursive algorithms as we want to calculate the points of the NURBS curve and surface.
* Corresponding author.
E-mail address: wgj@math.zju.edu.cn (G. Wang).
0167-8396/02/$ – see front matter  2002 Elsevier Science B.V. All rights reserved.
PII: S 0 1 6 7 - 8 3 9 6 ( 0 2 ) 0 0 1 2 4 - 3
410
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
The polynomial space spanned by the B-spline basis can be converted into the piecewise polynomial
representation spanned by the power basis so that the matrix representation for NURBS curves and
surfaces is always possible. There are some situations where it may be advantageous to generate the
coefficients of each of the polynomial pieces, e.g., when we have to evaluate the spline at a large number
of points, as might be the case if we want to graph it. Explicit matrix forms make it easier and faster to
evaluate NURBS curves and surfaces because polynomial evaluation is more efficient on a power basis,
which enables the efficient evaluation using Horner’s schema (Conte and de Boor, 1980).
Very few papers have been published in this area. The numerical algorithms for such matrix
representation have been found by de Boor (1978) and Schumaker (1981). Chang (1982) gave the matrix
representation for Bézier curves. General matrix representation for uniform B-spline curves are available
in (Cohen and Riesenfeld, 1982). Ding and Davies (1987) derived the matrix form for non-uniform
spline curves up to degree 3 from the de Boor–Cox algorithm (de Boor, 1972). A recursive algorithm
for the matrix representation of NURBS curves and surfaces of arbitrary degree has been given by Choi
et al. (1990). It is derived from Böhm’s knot insertion algorithm (Böhm, 1980), and it calculates the
coefficient matrix in a symbolic way. The recursive formula for the elements of the coefficient matrix for
non-uniform B-spline curves of arbitrary degrees is presented in (Grabowshi and Li, 1992) based on the
de Boor–Cox algorithm.
Choi et al. (1990) and Grabowshi and Li (1992) gave the computation method for the coefficient
matrix for NURBS curves and surfaces respectively. But the coefficient matrix is represented by a
recursive procedure not an analytical explicit one. The purpose of this paper is to present an analytical
explicit representation for the coefficient matrix. Based on the computation of divided difference and
the Marsden identity, two explicit matrix representation formulae for NURBS curves and surfaces of
arbitrary degree are obtained respectively. Being superior to the methods derived in (Choi et al., 1990;
Grabowshi and Li, 1992), our approaches can explicitly and directly calculated the coefficient matrix for
NURBS curves and surface. These results can be applied to all NURBS curves and surfaces in all forms.
The analytic representation formulae provide a uniform constructive tool and application approach for
the research of NURBS curves and surfaces such as their representation, transformation, knot insertion
and degree elevation etc.
After some preliminaries in Section 2, we give an explicit formula for the coefficients of NURBS based
on the computation of divided difference in Section 3. Section 4 give an alternative explicit formula based
on the Marsden identity. The explicit coefficient matrix of B-spline with equally spaced knot and Bézier
curves and surfaces are given by these formulae in Section 5. A conclusion section closes the paper.
2. Preliminaries
Definition 1. Let k be a positive integer, and let T = {ti } (ti < ti+k for all i) be a non-decreasing sequence
of real numbers. The ith normalized B-spline function of order k (degree k − 1) is defined as follows:
t − ti
ti+k − t
Ni,k−1 (t) +
Ni+1,k−1 (t), k > 1,
(1)
Ni,k (t) =
ti+k−1 − ti
ti+k − ti+1
and
Ni,1 (t) =
1 if ti t < ti+1 ,
0 otherwise.
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
411
Remark. The conversion 0/0 = 0 is adopted in the above definition, because some of the denominators
might be 0 at multiple knots.
Definition 2. The homogeneous form of the NURBS curve P(t) and NURBS surface P(t1 , t2 ) are defined
respectively by
P (t) =
h
n
Phi Ni,k (t)
(2)
i=0
and
Ph (t1 , t2 ) =
m n
Phi,j Ni,k1 (t1 )Nj,k2 (t2 ),
(3)
i=0 j =0
where Ni,k (t) are normalized B-spline function of order k, Phi and Phi,j are the homogeneous control
points Phi = (ωi Pi , ωi ) and Phi,j = (ωi,j Pi,j , ωi,j ), and ωi , ωi,j are the weights.
For the sake of convenience, we use the homogeneous form (2) and (3) to represent the NURBS curves
and surfaces in this paper.
Let Nl,k (t) be the normalized order k B-spline function defined on the knot sequence T = {ti }. For an
arbitrary nonempty interval [tr , tr+1 ) (tr < tr+1 ), Nl,k (t), l = r − k + 1, r − k + 2, . . . , r, are precisely
those for which Nl,k (t) have supports overlapping over [tr , tr+1 ). After the parameter normalization, i.e.,
u = (t − tr )/(tr+1 − tr ), they can be represented as polynomials in the unit interval [0, 1):
Nl,k (u) =
k−1
ai,l (r, T )ui ,
u ∈ [0, 1), l = r − k + 1, r − k + 2, . . . , r,
i=0
where ai,l (r, T ) are coefficients to be determined which are dependent on the index r and the knot
vector T .
Thus the NURBS curve Ph (t) has the following matrix form in the interval [tr , tr+1 ):
Ph (u) =
r
Phi Ni,k (t) = Ph Ar,k,T U,
(4)
i=r−k+1
h
where P = ( Phr−k+1 Phr−k+2 . . . Phr ) is the vector of homogeneous control points, U = (1
u . . . uk−1 )T is power basis, Ar,k,T is a matrix of order k × k:


a0,r−k+1 a1,r−k+1 . . . ak−1,r−k+1
 a0,r−k+2 a1,r−k+2 . . . ak−1,r−k+2 
,
(5)
Ar,k,T = 
..
..
..
..


.
.
.
.
a1,r
...
ak−1,r
a0,r
here the arguments r and T to ai,j may be omitted for notational convenience when there is no chance of
confusion.
Definition 3. The k × k matrix Ar,k,T in (5) is called the coefficient matrix of the NURBS curve Ph (t) in
the nonempty interval [tr , tr+1 ).
412
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
Based on the matrix forms of curve, it is straightforward to write the matrix forms for surface. We
omit the details here.
We now present two explicit formulae for the coefficient matrix Ar,k,T in the following sections.
3. Explicit representation of coefficient matrix by divided difference
3.1. Explicit representation of divided difference
Although the basic properties of divided difference are developed in most books on numerical analysis,
some of their finer properties (and in particular the case of repeated t’s) are often not discussed. Thus in
this section we give an explicit calculation formula for the kth divided difference. First, we have definition
of the osculatory interpolation as follows (de Boor, 1978).
Definition 4. Let T = {ti }ki=0 be a sequence of points not necessarily distinct. We say that the function
p agrees with the function q at T provided that, for every point t which occurs m times in the sequence
{t0 , t1 , . . . , tk }, p and q agree m-fold at t, i.e.,
p (j ) (t) = q (j ) (t),
j = 0, 1, . . . , m − 1.
(6)
Let
l
l
d
1
T = {t0 , t1 , . . . , tk } = {τ1 , . . . , τ1 , . . . , τd , . . . , τd }
(7)
where each τi is repeated exactly li times with τ1 < τ2 < · · · < τd , li > 0 (i = 1, 2, . . . , d) and
d
i=1 li = k + 1. It is known by (de Boor, 1978) that the kth divided difference [t0 , t1 , . . . , tk ]f of a
function f (t) at the points {t0 , t1 , . . . , tk } is the leading coefficient (i.e., the coefficient of t k ) of the
polynomial g(t) of degree k which agrees with f at the points t0 , t1 , . . . , tk . Suppose that
g(t) = c0 + c1 t + c2 t 2 + · · · + ck t k ,
then [t0 , t1 , . . . , tk ]f = ck . By the above definition we obtain a linear system of k + 1 equations for the
k + 1 unknown coefficients c0 , c1 , . . . , ck which can be written in matrix form as


 f (τ ) 
τ1k
1 τ1 τ12 . . .
1
 c 
k−1

 0 1 2τ . . .
0
kτ1
f (τ1 ) 
1




  c1  
. .
..
..
..

 c  
 .. ..
.
...
.
.
2 





k−l1 +1  
k!
(l1 −1)



0 0
τ
(τ
)
0
.
.
.
f
1

 


(k−l1 +1)! 1
(8)
=
.
.




. .
.
..
..
..  
..



 .. ..
.
.
.
.
.

 


  f (τd ) 

1 τ
τd2 . . .
τdk



d
 
..
 ck−1
. .


..
..

 .. ..
.
.
...
.
c
k
(l
−1)
k!
f d (τd )
τ k−ld +1
0 0
0 ...
(k−ld +1)! d
We now introduce a convenient notation for matrix. Given any k + 1 sufficiently differentiable functions
f0 , f1 , . . . , fk and the knot vector T in (7) we define
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419

f0 (τ1 )
 f0 (τ1 )

...

 (l1 −1)
(τ1 )
 f0

.
..
H (T ; f0 , f1 , . . . , fk ) = 


 f0 (τd )

 f0 (τd )

...
f0(ld −1) (τd )
f1 (τ1 )
f1 (τ1 )
...
f1(l1 −1) (τ1 )
..
.
...
...
...
...
..
.
fk−1 (τ1 )
fk−1
(τ1 )
...
(l1 −1)
fk−1
(τ1 )
..
.
f1 (τd )
f1 (τd )
...
f1(ld −1) (τd )
...
...
...
...
fk−1 (τd )
fk−1
(τd )
...
(ld −1)
fk−1
(τd )
413

fk (τ1 )
fk (τ1 ) 

...


fk(l1 −1) (τ1 ) 

..
.
.


fk (τd ) 

fk (τd ) 

...
fk(ld −1) (τd )
Then the matrix on left side of (8) can be denoted by H (T ; 1, t, . . . , t k ). It can be shown that its
determinant is
det H T ; 1, t, . . . , t k =
(τj − τi )
li lj
1i<j d
d l
i −1
j !.
i=1 j =0
So the linear system (8) has a unique solution and it follows from Cramer’s Rule that
det H (T ; 1, t, . . . , t k−1 , f )
.
(9)
det H (T ; 1, t, . . . , t k )
Expanding the determinant in the numerator of (9) with respect to its last column, we are led to the
following lemma.
[t0 , t1 , . . . , tk ]f = ck =
Lemma 1. Let
ld
l
1
T = {t0 , t1 , . . . , tk } = {τ1 , . . . , τ1 , . . . , τd , . . . , τd }
with τ1 < τ2 < · · · < τd , li > 0 (i = 1, 2, . . . , d) and
over knot T can be explicitly expressed by
[t0 , t1 , . . . , tk ]f =
li −1
d d
i=1 li
= k + 1. The kth divided difference of f
αi,j (T )f (j ) (τi ),
(10)
i=1 j =0
where
αi,j (T ) = βb(i,j )
b(i, j ) =

j
j +
(τv − τw )
1w<vd
i−1
lw lv
d l
w −1
v! ,
w=1 v=0
if i = 1,
lc
if i > 1,
i = 1, 2, . . . , d, j = 0, 1, . . . , li − 1,
(11)
c=1
and βi (i = 0, 1, . . . , k) is the cofactor corresponding to the ith element of the last column of the matrix
H (T ; 1, t, . . . , t k ).
Remark. Note that the coefficients αi,j (T ) in (10) are related with the knot vector T and independent
on f .
414
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
3.2. Explicit representation of coefficient matrix
Now we turn our attention to the B-spline basis function defined by divided difference. The normalized
B-spline function Nl,k (t) of order k can be defined by the kth divided difference over the knots
{tl , tl+1 , . . . , tl+k } (de Boor, 1978; Schumaker, 1981)
Nl,k (t) = (tl+k − tl )[tl , tl+1 , . . . , tl+k ](x − t)k−1
+ .
(12)
Applying Lemma 1 yields the explicit expression of B-spline function Nl,k (t) as the following lemma.
Lemma 2. Let the kth order B-spline basis Nl,k (t) be defined on the knot sequence
l (T )
l (T )
d l
1 l
Tl = {tl , tl+1 , . . . , tl+k } = {τ1 (Tl ), . . . , τ1 (Tl ), . . . , τd(Tl ) (Tl ), . . . , τd(Tl ) (Tl )}
l)
with τ1 (Tl ) < τ2 (Tl ) < · · · < τd(Tl ) (Tl ), li (Tl ) > 0 (i = 1, 2, . . . , d(Tl )) and d(T
i=1 li (Tl ) = k + 1. Let
[tr , tr+1 ) be a nonempty interval. Then for l = r − k + 1, r − k + 2, . . . , r,
Nl,k (u) =
k−1
u = (t − tr )/(tr+1 − tr ) ∈ [0, 1), t ∈ [tr , tr+1 ),
λs,l us ,
(13)
s=0
where
λs,l = (tl+k − tl )(tr − tr+1 )
s
d(T
l ) k−1−max(s,k−l
i)
i=1
τi >tr
αi,j (Tl )
j =0
(k − 1)!
(τi − tr )k−1−j −s ,
s!(k − 1 − j − s)!
s = 0, 1, . . . , k − 1.
(14)
Proof. Let t ∈ [tr , tr+1 ), u = (t − tr )/(tr+1 − tr ). From (12) and Lemma 1, we have
li −1
d d j (x − t)k−1
+ αi,j
Nl,k (t) = (tl+k − tl )
dx j
x=τi
i=1 j =0
= (tl+k − tl )
li −1
d i=1 j =0
τi >tr
= (tl+k − tl )
αi,j
(k − 1)!
(τi − t)k−1−j
(k − 1 − j )!
k−j −1 (k − 1)! k − 1 − j
αi,j
(τi − tr )k−1−j −s (tr − tr+1 )s us .
(k
−
1
−
j
)!
s
j =0
s=0
li −1
d i=1
τi >tr
The desired result is established after rearranging this sum.
✷
Remark. Note that d, li , τi and αi,j all depend on the knot sequence Tl in Lemma 2. In the above proof
we omit the argument Tl to d, li , τi and αi,j for notational convenience.
By Lemma 2 the explicit representation for the NURBS curve Ph (t) can be derived now.
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
415
Theorem 1. The coefficient matrix Ar,k,T in (5) of the NURBS curve Ph (t) in the nonempty interval
[tr , tr+1 ) is explicitly represented as
ai,j = λi,j ,
i = 0, 1, . . . , k − 1, j = r − k + 1, r − k + 2, . . . , r,
where λi,j are given by (14).
4. Explicit representation of coefficient matrix by Marsden indentity
Marsden’s identity (Marsden, 1970) is a marvelous result in B-spline theory, with a strikingly elegant
form. Originally used to prove convergence results for variation diminishing approximations, it also has
many other uses. An inductive proof of the identity is given in (Schumaker, 1981). In this section, we
present a new proof, perhaps even shorter, using nothing more than the recurrence relation (1) of Bsplines.
Theorem 2 (Marsden, 1970). If t ∈ [tr , tr+1 ), then for all x,
r
k−1
ωi,k (x)Ni,k (t),
(x − t) =
(15)
i=r−k+1
where
ωi,k (x) = (x − ti+1 )(x − ti+2 ) · · · (x − ti+k−1 ).
(16)
For k = 1, ωi,k (x) is understood as the constant 1.
Proof. If k = 1, (15) requires no further proof. Fix a k > 1, by the recurrence relation (1) we have
r
Wi0 Ni,k (t) =
i=r−k+1
where
Wi1 =
r
Wi1 Ni,k−1 (t),
(17)
i=r−k+2
t − ti
ti+k−1 − t 0
W0 +
W .
ti+k−1 − ti i
ti+k−1 − ti i−1
Suppose now that Wi0 = ωi,k (x), then Wi1 = (x − t)ωi,k−1 (x). Repeatedly using the relation (17) to
express B-spline in terms of lower order ones, we obtain
r
ωi,k (x)Ni,k (t) = (x − t)
i=r−k+1
r
ωi,k−1 (x)Ni,k−1 (t) = · · · = (x − t)k−1 ωr,1(x)Nr,1 (t).
i=r−k+2
Assertion (15) follows since ωr,1 (x) = 1 and Nr,1 (t) = 1 as t ∈ [tr , tr+1 ).
✷
The relation between B-spline function and power basis function is the following as Lemma 3.
Lemma 3. Let [tr , tr+1 ) be a nonempty interval. For l = r − k + 1, r − k + 2, . . . , r,
Nl,k (u) =
k−1
s=0
λ̄s,l us ,
u = (t − tr )/(tr+1 − tr ) ∈ [0, 1), t ∈ [tr , tr+1 ),
(18)
416
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
where
k−1 (tr+1 − tr )s i i−s ∗
t σi,l ,
λ̄s,l =
det ∆r,k,T i=s s r
∆r,k,T is the k × k matrix

σ0,r−k+1
 σ1,r−k+1
∆r,k,T = 
..

.
σi,j
σ0,r−k+2
σ1,r−k+2
..
.
s = 0, 1, . . . , k − 1,
...
...
..
.
(19)

σ0,r
σ1,r 
,
.. 
. 
(20)
σk−1,r−k+1 σk−1,r−k+2 . . . σk−1,r
(−1)i i! (k−1−i)
ω
=
(0), i = 0, 1, . . . , k − 1, j = r − k + 1, r − k + 2, . . . , r,
(k − 1)! j,k
(21)
∗
is the cofactor corresponding to the element σi,l of the k ×k matrix ∆r,k,T and ωi,k (x) = (x −ti+1 )(x −
σi,l
ti+2 ) · · · (x − ti+k−1 ).
Proof. Suppose that t ∈ [tr , tr+1 ). Comparison with the coefficients of terms with the same power
k − 1 − j (j = 0, 1, . . . , k − 1) of x on both sides of (15) gives
r
(−1)j j ! (k−1−j )
ωi,k
(0)Ni,k (t),
t =
(k − 1)! i=r−k+1
j
We write (22) in matrix form as




Nr−k+1,k (t)
1
(t) 
N
 t 
,
 .  = ∆r,k,T  r−k+2,k
..


 .. 
.
t k−1
Nr,k (t)
j = 0, 1, . . . , k − 1.
(22)
t ∈ [tr , tr+1 ),
(23)
where ∆r,k,T is the k × k matrix as (20). The result in (18) follows by
Nl,k (t) =
k−1
1
σ ∗ ti
det ∆r,k,T i=0 i,l
and
i i
(tr+1 − tr )s tri−s us ,
t =
s
s=0
i
u = (t − tr )/(tr+1 − tr ) ∈ [0, 1), i = 0, 1, . . . , k − 1.
✷
Remark 1. From (23) we can see that the matrix ∆r,k,T is non-singular.
Remark 2. Eq. (22) can also be written in terms of the classical symmetric functions as
1
r
j
i=r−k+1
t = k−1
j
Symj (ti+1 , ti+2 , . . . , ti+k−1 )Ni,k (t),
(24)
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
417
where Symj is the j th symmetric function of ti+1 , ti+2 , . . . , ti+k−1 which is defined by
ti1 ti2 · · · tij .
Symj (ti+1 , ti+2 , . . . , ti+k−1 ) =
i+1i1 <i2 <···<ij i+k−1
Eq. (24) can be seen by the fact that
(k−1−j )
ωi,k
(0) = (−1)j (k − 1 − j )! Symj (ti+1 , ti+2 , . . . , ti+k−1 ).
It follows from Lemma 3 that the explicit representation for the NURBS curve Ph (t) can be derived.
Theorem 3. The coefficient matrix Ar,k,T in (5) of the NURBS curve Ph (t) in the nonempty interval
[tr , tr+1 ) is explicitly represented as
ai,j = λ̄i,j ,
i = 0, 1, . . . , k − 1, j = r − k + 1, r − k + 2, . . . , r,
where λ̄i,j are given by (19).
5. Applications
Theorems 1 and 3 can be easily used to calculate the matrix representations for some special cases,
such as uniform B-spline curves and Bézier curves.
5.1. Matrix representation for B-spline with single multiplicity knots
Suppose T = {tl , tl+1 , . . . , tl+k } are distinct from each other. Then the determinant of the matrix
H (T ; 1, t, . . . , t k ) is Vandermonde determinant. By (10) and (11) we can easily compute
[tl , tl+1 , . . . , tl+k ]f =
l+k
αi f (ti ),
i=l
where
αi = l+k
1
j =l, j =i (tj
− ti )
,
i = l, l + 1, . . . , l + k.
Applying Lemma 2 the B-spline functions are obtained as
k−1
l+k
(ti − tr )k−1−s
s k−1
,
u
(tl+k − tl )(tr − tr+1 )s
Nl,k (t) =
l+k
s
j =l, j =i (tj − ti )
s=0
i=r+1
t ∈ [tr , tr+1 ), u = (t − tr )/(tr+1 − tr ),
for l = r − k + 1, r − k + 2, . . . , r. Then by Theorem 1 the coefficient matrix Ar,k,T in the interval [tr , tr+1 )
is derived by
j +k
k−1
(tw − tr )k−1−i
i
,
(tj +k − tj )(tr − tr+1 )
ai,j =
j +k
i
v=j, v=w (tv − tw )
w=r+1
i = 0, 1, . . . , k − 1, j = r − k + 1, r − k + 2, . . . , r.
(25)
418
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
5.2. Matrix representation for uniform B-spline
If the spacing between the knots is equal, say 1, then the B-spline is called a uniform B-spline basis. By
(25), performing the index transformation, j = r − k + 1 + s, v = w − r − 1, and w = s − v successively,
gives
s
k−1
(−1)w (s − w + 1)k−1−i
i
,
k(−1)
ai,j =
(k − w)!w!
i
w=0
i = 0, 1, . . . , k − 1, j = r − k + 1, r − k + 2, . . . , r.
After simplifications and rearrangements one obtains the coefficient matrix Ar,k,T in the interval
[tr , tr+1 ) = [r, r + 1) as
k−1 j
i
i
w k
(−1)
(j − w + 1)k−1−i , i, j = 0, 1, . . . , k − 1.
ai,r−k+1+j = (−1)
(k − 1)! w=0
w
It turns out that the coefficient matrix Ar,k,T in the interval [r, r + 1) is independent to the index r. And
any B-spline can be obtained from one basic B-spline by translation.
5.3. Matrix representation for Bézier curve
Degree k − 1 Bézier curve is defined by
p(t) =
k−1
t ∈ [0, 1],
pi Bik−1 (t),
i=0
where
k−1
=
(1 − t)k−1−i t i
i
are the degree k − 1 Bernstein basis functions. As a special case of B-spline, the Bernstein basis functions
with degree k − 1 are the B-spline basis subordinate to the knots
Bik−1 (t)
k
k
T = {0, 0, . . . , 0, 1, 1, . . . , 1}.
Putting this T in (16), we can write
ωi,k (x) = x k−1−i (x − 1)i ,
i = 0, 1, . . . , k − 1.
With some algebraic calculation by (19)–(21) we can obtain
Nl,k (t) = Blk−1 (t),
t ∈ [tk−1 , tk ) = [0, 1), l = 0, 1, . . . , k − 1,
which are the Bernstein basis function of degree k − 1. By Theorem 3 the coefficient matrix Ar,k,T in the
interval [tk−1 , tk ) = [0, 1) is derived by

j

i+j k − 1
(−1)
, if i j ,
i, j = 0, 1, . . . , k − 1.
ai,j =
j
i

0
if i > j ,
L. Liu, G. Wang / Computer Aided Geometric Design 19 (2002) 409–419
419
6. Conclusions
The matrix forms for curves and surfaces were largely promoted in CAD. These formulations are very
compact to write, simple to program, and clear to understand. They manifest the desired basis as a matrix
transformation of the common power basis. Furthermore, this implementation can be made extremely
fast if appropriate matrix facilities are available in either hardware or software.
Two methods for obtaining explicit matrix representation of NURBS curves and surfaces of arbitrary
degrees have been presented in this paper. Evaluation of an explicit matrix form is faster than evaluation
of recursive forms. As pointed out in (Choi et al., 1990), the recursive representations have exponential
time complexity while the matrix form has polynomial complexity (with respect to the degree of the
curve and surface). For example, when 100 points are sampled from a bi-cubic NURBS surface patch,
the evaluation of the matrix form takes only about 9% of the execution time that the evaluation of the knot
insertion algorithm takes. On the other hand these formulae are complex and numerically problematic in
some cases which needs future study.
Acknowledgements
We would like to thank the anonymous reviewers for their comments. This research was partly
supported by the National Natural Science Foundation of China (grant no. 60173034), Zhejiang
Provincial Natural Science Foundation of China, and Foundation of State Key Basic Research 973 Item
(grant no. G1998030600).
References
Böhm, W., 1980. Inserting new knots with B-spline curves. Computer-Aided Design 12 (4), 199–201.
de Boor, C.W., 1972. On calculating with B-splines. J. Approx. Theory 6, 50–62.
de Boor, C.W., 1978. A Practical Guide to Splines. Springer-Verlag, New York.
Chang, G., 1982. Matrix foundation of Bézier technique. Computer-Aided Design 14 (6), 350–354.
Choi, B.K., Yoo, W.S., Lee, C.S., 1990. Matrix representation for NURBS curves and surfaces. Computer-Aided Design 22 (4),
235–240.
Cohen, E., Lyche, T., Riesenfeld, R.F., 1980. Discrete B-splines and subdivision technique in computer-aided geometric design
and computer graphics. Computer Graphics and Image Processing 14, 87–111.
Cohen, E., Riesenfeld, R.F., 1982. General matrix representation for Bézier and B-spline curves. Computers in Industry 3, 9–15.
Conte, S.D., de Boor, C., 1980. Elementary Numerical Analysis. McGraw-Hill, New York.
Ding, Q.L., Davies, B.J., 1987. Surface Engineering Geometry for Computer Aided Design and Manufacture. Ellis Horwood.
Grabowshi, H., Li, X., 1992. Coefficient formula and matrix of nonuniform B-spline functions. Computer-Aided Design 24 (12),
637–642.
Marsden, M.J., 1970. An identity for spline functions with applications to variation-diminishing spline approximation.
J. Approx. Theory 3, 7–49.
Piegl, L., Tiller, W., 1997. The NURBS Book. Springer, New York.
Schumaker, L.L., 1981. Spline Functions: Basic Theory. Wiley, New York.
Download