Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

1 Introduction

Matrix theory and its algorithms are very useful


in computer-aided geometric design, since the ma-
trix is an important and basic tool in mathematics.
Matrix formulas of B-spline curves and surfaces
have the advantages of both simple computation of
points on curves or surfaces and their derivatives
and of easy analysis of the geometric properties of
B-spline curves and surfaces. In 1982, Chang [1]
gave the matrix formula of Bézier curves. Cohen and
Riesenfeld [5] gave matrix formulas, not only for
Bézier curves but also for uniform B-splines of an
arbitrary degree in 1982. In 1990, Choi, Yoo, and
General matrix Lee [2] proposed a procedure to symbolically eval-
uate a matrix for a B-spline curve using Boehm’s
representations knot-insertion algorithm [14]. Grabowski and Li [3]
in 1992, and Wang, Sun and Qin [4] in 1993 got
for B-splines the matrix by analogous approaches instead of an
explicit formula. In fact, Grabowski and Li rewrote
the de Boor-Cox recursive formula in a polyno-
mial form so that the polynomial coefficients can
Kaihuai Qin easily be collected into the matrix. At present, an
explicit matrix formula for nonuniform rational
Dept. of Computer Science & Technology, Tsinghua B-spline (NURBS) curves has not been found, al-
University, Beijing 100084, P.R. China though the matrix representation can be obtained by
e-mail: qkh-dcs@tsinghua.edu.cn algorithms.
In this paper, a generalized recursive matrix for-
mula for NURBSs is presented, and new matrix
formulas for uniform B-splines and Bézier curves
In this paper, the concept of the basis matrix are obtained. Some applications are given in the
of B-splines is presented. A general matrix paper, too.
representation, which results in an explicitly The organization of this paper is as follows: Sect. 2
recursive matrix formula, for nonuniform B- describes how to represent the de Boor-Cox for-
spline curves of an arbitrary degree is also mula for B-splines using the Toeplitz matrix [7].
presented by means of the Toeplitz matrix. In Sect. 3, general matrices for B-spline curves are
New recursive matrix representations for proposed. New recursive matrix formulas for rep-
uniform B-spline curves and Bézier curves resenting uniform B-splines and Bézier curves are
of an arbitrary degree are obtained as special obtained as special cases of the basis matrix for-
cases of that for nonuniform B-spline curves. mula of NURBS curves in Sect. 4. Some applications
The recursive formula for the basis matrix are shown in Sect. 5. Finally, conclusions are given
can be substituted for de Boor-Cox’s formula in Sect. 6.
for B-splines, and it has a better time com-
plexity than de Boor-Cox’s formula when
used for computation and conversion of B-
spline curves and surfaces between different 2 Representing the de Boor-Cox
CAD systems. Finally, some applications of formula by the Toeplitz matrix
the matrix representations are given in the
paper. First of all, let us look at how to represent a poly-
nomial and a product of two polynomials using the
Key words: B-splines – Matrix representa- Toeplitz matrix [7]. The Toeplitz matrix representa-
tions – Toeplitz matrix tion of de Boor-Cox formula for B-splines will be
introduced afterwards.

The Visual Computer (2000) 16:177–186


c Springer-Verlag 2000
178 K. Qin: General matrix representations for B-splines

2.1 The Toeplitz matrix One can obtain


f(x) = g(x)q(x)
The Toeplitz matrix is one whose elements on any
line parallel to the main diagonal are all equal.  
c0 0  
A banded Toeplitz matrix is defined as follows:  c1 c0  d0
 .   d1 
   . .. ..  . 
α0 α1 · · · αs 0  . . .  . 
 . ..  . 
  

α−1
.
α0 . . αs

 = X cm−1 · · · . . .  dn−1 
   .. .. ..  0 
 .. ..   . ··· . .  
 . .    . 
   ..   .. 
 .. . . .   cm−1 ··· . c0 
T =  . ··· . . . . . . · · · .αs  . 0
 ..  0 cm−1 · · · c1 c0
 
 . . .. 
α−r
 · · · .. .. . α1 
  
 ..  c0 0
.  c1 c0 
0 α−r · · · α−1 α0  .. .. .. 
 . . . 
 
 .. ..  d 
For example, a special Toeplitz matrix, or a lower tri-  . ··· . c0  0
   d1 
angular matrix  .. . 
= X · · · · · · .. 
. . 
     .. 
cm−1 cm−2 · · · cm−n 
a0 0  ..  d
 a1   ..  n−1
 .
a0
  cm−1 . . 
 . ... ...   .. 
 .   . cm−2 
T =
a .. .. 
 0 cm−1
 n−1 · · · . . 
 . . 
 .. · · · .. ...   
where X = 1 x x 2 · · · x m+n−2 . This is the Toeplitz
0 an−1 · · · a1 a0 matrix representation of the product of two polynomials.

can be constructed by the coefficients of a polyno-


mial 2.3 Representing the de Boor-Cox formula
using Toeplitz matrix
f(x)=a0 + a1 x + a2 x 2+ . . . +an−1 x n−1 (an−1 6 = 0).
The B-spline first introduced by Schoenberg [9] has
been used in various fields such as computer-aided
design, computer graphics, numerical analysis, and
2.2 Representing the product of two so on. The normalized local support B-spline basis
function of degree k − 1 is defined by the following
polynomials using the Toeplitz matrix de Boor-Cox recursive formula [6, 10], that is
 t −t


t−t
B j,k (t)= t j+k−1j−t j B j,k−1 (t)+ t j+kj+k−t j+1 B j+1,k−1 (t);
Let 


g(x) = c0 + c1 x + c2 x 2 + . . . + cm−1 x m−1 
 1, t ∈ [ti , ti+1 );

 i,1
B (t) =
(cm−1 6 = 0), 0, t ∈ / [ti , ti+1 )
(1)
q(x) = d0 + d1 x + d2 x 2 + · · · + dn−1 x n−1
with the convention 0/0 = 0. By means of basis
(dn−1 6 = 0). translation from B-spline to power basis [11, 12],
K. Qin: General matrix representations for B-splines 179

B j,k−1 (u) can be represented as follows: 3 General matrices for NURBS


 k−1
 curves and surfaces
N0, j
 k−1 
N 
 1, j  B-spline basis functions B j,k (t) are piecewise poly-
2 k−2 
B j,k−1 (u) = [1 u u · · · u ]  .  ,
 ..  nomials of degree k − 1. If t ∈ [ti , ti+1 ), ti < ti+1 ,
  there are k B-spline basis functions of degree k − 1
k−1
Nk−2, j that are nonzero: B j,k (t), j = (i − k + 1), (i − k +
2), . . . , i. They can be represented in a matrix equa-
t − ti tion as follows:
u= , u ∈ [0, 1).
ti+1 − ti  
Bi−k+1,k (u) Bi−k+2,k (u) · · · Bi,k (u)
Thus, (1) can be rewritten by the Toeplitz matrix:
 
 = 1 u u 2 · · · u k−1 Mk (i), (3)
B j,k (u) = d0, j + ud1, j B j,k−1 (u)
 where u = (t − ti )/(ti+1 − ti ), u ∈ [0, 1),
+ h 0, j + uh 1, j B j+1,k−1 (u)
 
k
N0,i−k+1 k
N0,i−k+2 · · · N0,i
k
 k−1   

 N0, j 0  Nk k
· · · N1,ik 

  k−1 k−1   1,i−k+1 N1,i−k+2 

  N1, j N0, j   

  " # Mk (i) =  .. .. .. 

  .  d0, j  
 
    . . ··· . 
= 1 u u 2 · · · u k−1 

  .. k−1
N1, j 
 

   d1, j Nk−1,i−k+1 Nk−1,i−k+2 · · · Nk−1,i
k k k

  .. 

  k−1 

  Nk−2, j . 

 k−1
0 Nk−2, and t j are the knots.
j
Let V j be the control vertices of a B-spline curve.
The B-spline curve segment is:
 k−1  
N0, j+1 0 
  
 k−1  
 ci−k+1 = Bi−k+1,k (u) Bi−k+2,k (u) · · · Bi,k (u)
 N1, j+1 N0,k−1  

 j+1 " #
  
 ..  h 0, j 

 Vi−k+1
 k−1  

+ . N1,  ,  
 j+1  h 1, j 

 Vi−k+2 
 .  
  
 N k−1 ..  
 × . 
 k−2, j+1  
  .. 

  
k−1
0 Nk−2, j+1 Vi
(2)
 
where u = t−ti Vi−k+1
ti+1 −ti , u ∈ [0, 1),
 
  k  V 
 i−k+2 
ti − t j ti+1 − ti = 1u u ···u
2 k−1
M (i)  .  , (4)
d0, j = , d1, j = ,  .. 
t j+k−1 − t j t j+k−1 − t j  
Vi
t j+k − ti ti+1 − ti
h 0, j = , h 1, j = −
t j+k − t j+1 t j+k − t j+1 where u = (t − ti )/(ti+1 − ti ), u ∈ [0, 1).
Mk (i) is referred to as the ith basis matrix of the
with the convention 0/0 = 0. B-spline basis functions of degree k − 1.
180 K. Qin: General matrix representations for B-splines

 
3.1 Recursive formula for basis matrices of k−2
z }| {
B-splines of degree k − 1  0 · · · 0
× 0 d0,i−k+2 
0 d1,i−k+2 0···0
Theorem 1. The ith basis matrix Mk (i) of B-spline
basis functions of degree k − 1 can be obtained by  
k−1
a recursive equation as follows: N0,i 0
  k−1   k−1 k−1 
 N1,i N0,i   

 k (i) = M (i)   k−1

 M  .  z }| {
  k−1  0 · · · 0 d 


 
0
 + · · · +  .. N1,i  0,i 

 1−d0,i−k+2 d0,i−k+2 0  

  
..  0 · · · 0 d1,i

    N k−1

  1−d0,i−k+3 d0,i−k+3   k−2,i . 

 ×  .. .. 

  . .  k−1


0 Nk−2,i


  0

1−d0,i d0,i
0  k−1 
+

N0,i−k+2 0

 M k−1 (i)
 k−1 

    N1,i−k+2 N0,i−k+2
k−1  

 −d1,i−k+2 d1,i−k+2 0  

  
k−1
z }| {

  −d1,i−k+3 d1,i−k+3   ..  h 

   + . k−1
N1,i−k+2   0,i−k+1 0 · · · 0

 ×  .. .. ,  

  . .   ..  h 1,i−k+1 0 · · · 0

  N k−1 

 −d1,i d1,i  k−2,i−k+2 . 

 0
 1
M (i) = [1]. 0 k−1
Nk−2,i−k+2
(5)
 k−1 
Proof. Substituting (2) into (3) yields: N0,i−k+3 0
 k−1   k−1 
 N1,i−k+3 N0,i−k+3
k−1  
N0,i−k+1 0   k−2
 k−1   ..  z }| {
 N1,i−k+1 N0,i−k+1   0 h 
 0,i−k+2 0 · · · 0
k−1
  + . k−1
N1,i−k+3
   
 .   ..  0 h 1,i−k+2 0 · · · 0
Mk (i) =  .. k−1
N1,i−k+1   N k−1 . 
   k−2,i−k+3 
 .. 
 N k−1 .  0 k−1
Nk−2,i−k+3
 k−2,i−k+1 
k−1
0 Nk−2,i−k+1  k−1 
N0,i+1 0
   k−1 
k−1
z }| {  N1,i+1 N0,i+1
k−1  
   k−1
× d0,i−k+1 0 · · · 0
  ..  z }| {
  0 · · · 0 h 
d1,i−k+1 0 · · · 0 +···+ . k−1
N1,i+1  0,i  .
 
 ..  0 · · · 0 h 1,i
   N k−1 . 
k−1
N0,i−k+2 0  k−2,i+1 
k−1
 k−1  0 Nk−2,i+1
 N1,i−k+2 N0,i−k+2
k−1 
 
 .. 
 
+ . k−1
N1,i−k+2 
 
 ..  Since it is well known by means of the local property
 N k−1 . 
 k−2,i−k+2  of B-splines [11, 12] that the first term and the last
k−1 term of the right-hand side of this equation are equal
0 Nk−2,i−k+2 to zero, omitting them yields
K. Qin: General matrix representations for B-splines 181

 k−1   
N0,i−k+2 0 h 0,i−k+1 d0,i−k+2 0
 k−1  " # 
 N1,i−k+2 N0,i−k+2
k−1 



 Mk−1 (i) 

h 0,i−k+2 d0,i−k+3 

 ..  =  .. .. 
M (i) = 
k
. k−1
N1,i−k+2  0  . . 
   
 .. 
 N k−1 .  0 h 0,i−1 d0,i
 k−2,i−k+2 
k−1  
0 Nk−2,i−k+2 h 1,i−k+1 d1,i−k+2 0
  " # 
k−2 0  h 1,i−k+2 d1,i−k+3 
z }| {  
 0 · · · 0 +  .
× h 0,i−k+1 d0,i−k+2  Mk−1 (i)  .. .. 
 . . 
h 1,i−k+1 d1,i−k+2 0 · · · 0
0 h 1,i−1 d1,i
 k−1 
N0,i−k+3 0
 k−1  Notice that h 1, j−1 = −d1, j , h 0, j−1 = 1 − d0, j , and
 N1,i−k+3 N0,i−k+3 k−1 
  M1 (i) = [1]. Thus, (5) holds.
 . 
 ..  
+ k−1
N1,i−k+3 
 
 ..  Equation 5 can be regarded as a recursive definition
 N k−1 . 
 k−2,i−k+3  of basis matrices. It can be used for both analysis of
k−1  k−1  properties of NURBS curves and surfaces, and nu-
0 Nk−2,i−k+3 N0,i 0
 k−1 k−1  merical or symbolic computation of NURBS curves
   N1,i N0,i  and surfaces.
k−3  
z }| {  . 
0 h   k−1 
× 0,i−k+2 d0,i−k+3 0· · ·0+· · ·+ .. N1,i 
 
0 h 1,i−k+2 d1,i−k+3 0· · ·0  ..  3.2 Examples of symbolic computation
N k−1 
 k−2,i . 
 
k−2 k−1
0 Nk−2,i Using (5) for the symbolic computation, when u =
z }| {
  (t − ti )/(ti+1 − ti ) ∈ [0, 1) one can easily obtain the
× 0 · · · 0 h 0,i−1 d0,i 
following basis matrices:
0 · · · 0 h 1,i−1 d1,i

 ti+1 −ti ti −ti−1



ti+1 −ti−1 ti+1 −ti−1 0
  −2(t −t ) 
1 0  i+1 i 2(ti+1 −ti ) 
M (i) = [1],
1
M (i) =
2
, M3 (i) =  ti+1 −ti−1 ti+1 −ti−1 0 ,
−1 1    
ti+1 −ti ti+1 −ti
ti+1 −ti−1 −(ti+1 − ti )  ti+1 −t
1
i−1
+ 1 
ti+2 −ti ti+2 −ti−1

 (ti+1 −ti )2 (ti −ti−1 )2



(ti+1 −ti−1 )(ti+1 −ti−2 ) 1 − m 0,0 − m 0,2 (ti+2 −ti−1 )(ti+1 −ti−1 ) 0
 
 −3m 0,0 3m 0,0 − m 1,2 3(ti+1 −ti )(ti −ti−1 ) 
 (ti+2 −ti−1 )(ti+1 −ti−1 ) 0 
M (i) = 
4



3(ti+1 −ti )2
 3m 0,0 −3m 0,0 − m 2,2 (ti+2 −ti−1 )(ti+1 −ti−1 ) 0 
 
(ti+1 −ti )2
−m 0,0 m 0,0 − m 3,2 − m 3,3 m 3,2 (ti+3 −ti )(ti+2 −ti )
182 K. Qin: General matrix representations for B-splines

where Unlike the basis matrices of NURBSs, the basis ma-


trices of uniform B-splines of degree k − 1 are inde-
m 3,2 = −m 2,2 /3 − m 3,3 − (ti+1 − ti )2 / pendent of ti .
[(ti+2−ti )(ti+2 −ti−1 )], Using (7) recursively step by step, one can also ob-
tain the following matrix:
m i, j = element in row i, column j.  
m 0,0 m 0,1 · · · m 0,k−1
 m 1,0 m 1,1 · · · m 1,k−1 
Mk =   ... .. .. ,
 (8)
4 Special cases of basis matrices . ··· .
m k−1,0 m k−1,1 · · · m k−1,k−1
It is well known that a B-spline curve with equally where
spaced knots is referred to as a uniform B-spline
curve; and a B-spline curve with the knot vector, 1 X k−1
k−1−i
m i, j = Ck−1 (−1)s− j
 k k  (k − 1)!
z }| { z }| { s= j
a0 , · · · , a0 , a1 , · · · , a1 (a0 < a1 ), s− j
× Ck (k − s − 1)k−1−i ,
n!
is regarded as a Bézier curve. Analogously, the ba- Cni = .
sis matrices for uniform B-spline curves and Bézier i!(n − i)!
curves can be obtained by (5) using the correspond- Both (7) and (8) can be used to calculate the basis
ing knot vectors. matrices of uniform B-splines. Several examples of
basis matrices for uniform B-splines are given as fol-
4.1 Basis matrices of uniform B-splines lows:
 
M1 = 1 ,
For uniform B-spline curves and surfaces, the spac-  
ing between the knots is equal, say t j − t j−1 ≡ 1. M2 =
1 0
,
Thus, one has −1 1
( " #
i− j
d0, j = k−1 , 1 1 1 0
(6) M =
3
−2 2 0 ,
d1, j = k−1 .
1 2! 1 − 2 1
 
1 4 1 0
Substituting (6) into (5), one can get: 1 −3 0 3 0
M4 =  ,
Theorem 2. The basis matrices of uniform B-splines 3! 3 − 6 3 0
satisfy the following recursive formula: −1 3 − 3 1
 
    1 11 11 1 0
  1 k−2
1  −4 − 12 12 4 0
  0

  k−1  
   

  M  2 k−3 M 5 =  6 − 6 − 6 6 0 .

 k= 1    4! −4 12 − 12 4 0
 M k−1   .. .. 

 
 0  . . 

 
 1 −4 6 −4 1

 k−1 0
 
0

−1 1 0  

   

 0  −1 1 

 +  , 4.2 Basis matrices for Bézier curves

 k−1
 . . . .   


 M . . 


  Suppose that the knot vector of a B-spline curve of

 0 −1 1

 1 degree k − 1 is as follows:
M = [1].
(7) z }| k
{ z }| {
k

0, · · · , 0, 1, · · · , 1 .
if u = (t − ti )/(ti+1 − ti ), u ∈ [0, 1).
K. Qin: General matrix representations for B-splines 183

Thus,
 
 1 0 0 0
d0, j = 0,  −3 3 0 0
M4 =  ,
d1, j = 1.
(9) 3 −6 3 0
−1 3 − 3 1
Substituting (9) into (5), one can obtain:  
1 0 0 0 0
Theorem 3. The basis matrices of Bézier curves sat- −4 4 0 0 0
 
isfy the following recursive formula: M5 =  6 − 12 6 0 0 ,
−4 12 − 12 4 0
   1 −4 6 −4 1

 −1 1 0
  k−1   


 Mk = M 0 0  −1 1 0  
+  , 1 0
Mk−1  .. ..    −5 5 

0 0 . .
  

 −1 1  10 − 20 10 

 1
0 M6 =  .
M = [1] −10 30 − 30 10 
 5 − 20 30 − 20 5 
(10) −1 5 − 10 10 − 5 1
if u = (t − ti )/(ti+1 − ti ), u ∈ [0, 1).

Like the basis matrices of uniform B-splines, the ba-


sis matrices of Bézier curves of degree k − 1 are inde-
pendent of ti . 5 Applications
Using (10) recursively step by step, one can also ob-
tain the following matrix for Bézier curves easily:
  There are many applications of the basis matrices in
m 0,0 0
 m 1,0 m 1,1  practice. Some of them are given in this section.
Mk = 
 .. . .
.. . ..
,
 (11)
m k−1,0 m k−1,1 · · · m k−1,k−1 5.1 Computation of derivatives of NURBS
curves
where
( Assume there is a NURBS curve of degree k − 1.
j i− j
(−1)i− j Ck−1 Ck−1− j , i ≥ j;
m i, j = ci−k+1 (u) = U k Mk (i)V k (i), i = k − 1, k, . . . , n,
0, i < j.
u = (t − ti )/(ti+1 − ti ), u ∈ [0, 1) (12)
Mk is a lower triangular n × n matrix.
defined over the knot vector T = {t0 , t1 , . . . , tn+k },
Both (10) and (11) can be used to calculate the basis
where
matrices of Bézier curves. Several examples of the
basis matrices for Bézier curves are given as follows:  
Vi−k+1
    Vi−k+2 
M1 = 1 , U k = 1 u u 2 · · · u k−1 , V k (i) = 
 ...  .

 
1 0 Vi
M2 = ,
−1 1
" # Then
1 0 0  n 
M3 = −2 2 0 , dn  d k
ci−k+1 (u) =  U  Mk (i)V k (i),
1 −2 1 du n du n
184 K. Qin: General matrix representations for B-splines

where derivatives, or dn (U k )/ du n , can easily be After its degree is elevated by 1, a segment of


computed, for instance, dU k / du = [0 1 2u . . . (k − B-spline curve of degree k − 1 defined by (12) can be
1)u k−2 ]. rewritten as follows:
 
k+1 M (i)
k
5.2 Computation of derivatives of NURBS ci−k+1 = U V k (i)
0
curves
= U k+1 Mk+1 (i)V k+1 (i) (13)
For a NURBS curve of degree k − 1
Thus, one can obtain the control vertices for the
ci−k+1 (u) = U k Mk (i)P k (i)/U k Mk (i)W k (i) degree-raised curve:
∆  
= R(u)/S(u),  k+1 −1 Mk (i) k
V (i) = M (i)
k+1
V (i). (14)
0 ≤ u = (t − ti )/(ti+1 − ti ) < 1 0
where Suppose that there is a B-spline curve of degree k − 1
    with control vertices Vi , (i = 0, 1, . . . , n) defined
wi−k+1 Vi−k+1 wi−k+1
 w V   w  over a knot vector
i−k+2 i−k+2
P k (i) =  ..  , W k (i)  i−k+2
..  . 
 .   . 
s
z }|1 { z
s
}|2 {
wi Vi wi t0 t1 · · · tk−1 tk · · · tk tk+1 · · · tk+1 · · ·
sm 
The derivatives of a NURBS curve with respect to z }| {
u can easily be obtained since the basis matrixes are tk+m−1 · · · tk+m−1 tn+1 tn+2 tn+k ,
independent of u.
n   j
X where s1 + s2 + . . . + sm = n − k + 1. In order for de-
dn n d dn− j 1
c i−k+1 (u) = R(u) . gree raising of the whole curve by 1, the multiplic-
du n j du j du n− j S(u) ity of each interior knot has to be added by 1 using
j=0
a knot-insertion algorithm [8, 13, 15], so that the knot
Frequently used are the first and the second deriva- vector becomes as follows:
tives of NURBS curves:
 s +1 s +1
d −R(u) d 1 d z 1}| { z 2}| {
ci−k+1 (u) = S(u) + R(u), t−1 t0 t1 · · · tk−1 tk · · · tk tk+1 · · · tk+1 · · ·
du 2
S(u) du S(u) du
(  2 sm +1 
d2 2  d z }| {
ci−k+1 (u) = R(u)  S(u)  tk+m−1 · · · tk+m−1 tn+1 tn+2 tn+k tn+k+1 .
du 2 S(u)3 du

1 d2 Then, a B-spline curve of degree k can be ob-
− S(u) tained with degree raising of all the segments of
S(u)2 du 2
the curve using (14). This idea for degree raising of
2 d d B-splines is feasible, but it is less efficient than the el-
− R(u) S(u)
S(u)2 du du egant method for degree raising of B-splines in [13]
and [15].
1 d2
+ R(u).
S(u) du 2 5.4 Degree reduction of B-spline curves

5.3 Degree raising for NURBS curves Degree reduction of B-spline curves is a difficult
problem, since, generally, a B-spline curve of de-
Degree raising for NURBS curves is a common tech- gree k cannot be precisely represented by a curve of
nique in CAGD. The basis matrix of B-splines can be degree k − 1. Of course, it can be approximated by
used for degree raising of B-spline curves. a B-spline curve of a lesser degree. One can obtain
K. Qin: General matrix representations for B-splines 185

Table 1. Comparison of the three methods

An arbitrary order (k) k=4


Tmultiplication Tdivision Taddition Tmultiplication Tdivision Taddition Sum total Percentage
(∼
= Taddition )
4k2 (4k −4) 4k2 (4k −4) 4k2 (4k −4)
Choi et al. [2] 3 3 3 5376 5376 5376 17 418 12 266

Grabowski and Li [3] (4k −6k+2)k k(2k2 −3k+1) (6k2 −9k+3)k


2
3 3 2 56 28 126 220 155
(4k2 −6k+2)k (2k2 +k−3)k
The new method 3 k(k − 1) 2 56 12 66 142 100

the least-square solution of this problem for a seg- in [3] in numerical evaluation as well as the de Boor-
ment of B-spline curve using (13) Cox formula. Assume that the execution times T sat-
h isfy [2] Taddition ∼
= Tsubtraction , Tmultiplication ∼
= Tdivision
 k T i  k −1 and Tmultiplication ∼
= 1.12Taddition . The comparison of

 M (i) 

V (i) =  M (i)
k
0  the three methods for the basis matrices of NURBS
0
h T i  of degree k − 1 is shown in Table 1.
× Mk (i) 0 Mk+1 (i) V k+1 (i).
Acknowledgements. This project was supported by the National Natural
Science Foundation (NSF) of China.
Similarly, one can obtain the least-square solution of
this problem for a whole B-spline curve.

References
6 Conclusions
1. Chang G (1982) Matrix foundation of Bézier technique.
Comput Aided Des 14:354–350
By means of the basis matrix proposed in this pa- 2. Choi BK, Yoo WS, Lee CS (1990) Matrix representation
per, the matrix representations of nonuniform and for NURB curves and surfaces. Comput Aided Des 22:235–
uniform B-splines and Bézier curves can be uni- 240
fied by a recursive formula. It is shown that the 3. Grabowski H, Li X (1992) Coefficient formula and ma-
matrix representations for uniform B-splines and trix of nonuniform B-spline functions. Comput Aided Des
24:637–642
Bézier curves can be regarded as special cases of 4. Wang X, Sun J, Qin K (1993) Symbolic matrix representa-
the basis matrix of NURBS. Like de Boor-Cox re- tion of NURBS and its applications (in Chinese). Chinese J
cursive definition of B-splines, the basis matrices of Comput 16:29–34
B-splines can be defined by (5), too. With regard 5. Cohen E, Riesenfeld RF (1982) General matrix representa-
to B-spline surfaces, the basis matrices can be used tions for Bézier and B-spline curves. Comput Ind 3:9–15
6. Boor C de (1972) On calculating with B-splines. J Approx
for the surfaces in the same way as B-spline curves. Theory 6:50–62
The recursive basis matrix formula, or (5), can be 7. Vidom H (1965) Toeplitz matrices. In: Hirschmann I (ed)
substituted for the de Boor-Cox recursive function Studies in Real and Complex Analysis. MAA Studies in
when used for computation of B-spline curves and Mathematics 3. Prentice-Hall, Inc., Englewood Cliffs, NJ,
surfaces. pp 179–209
8. Qin K, Guan Y (1997) Two algorithms for inserting knots
In fact, the general matrix formula of NURBS of an into B-spline curves (in Chinese). Chinese J Comput
arbitrary degree, or (5), can be used both for sym- 20:557–561
bolic or numerical computation of NURBS curves 9. Schoenberg IJ (1946) Contributions to the problem of ap-
and surfaces, and for theoretical analysis of prop- proximation of equidistant data by analytic functions. Quart
erties of NURBS curves and surfaces. In fact, the Appl Math 4:112–141
10. Cox MG (1972) The numerical evaluation of B-splines.
recursive basis-matrix formula, or (5), for NURBS J Inst Math Appl 10:134–149
of an arbitrary degree is more efficient than the sym- 11. Boor C de (1978) Practical Guide to Splines. Springer,
bolic approach in [2] and the numerical algorithm Berlin, Heidelberg, New York
186 K. Qin: General matrix representations for B-splines

12. Schumaker L (1981) Spline functions: basic theory. John K AIHUAI Q IN is a Professor
Wiley, New York of Computer Science and Tech-
13. Qin K (1996) A new algorithm for degree-raising of nology, at Tsinghua University,
nonuniform B-spline curves (in Chinese). Chinese J Com- Beijing, P.R. China. Dr. Qin was
put 19:537–542 a Postdoctoral Fellow from 1990
14. Boehm W (1980) Inserting new knots into B-spline curves. to 1992, then joined the Depart-
Comput Aided Des 12:199–201 ment of Computer Science and
15. Qin K (1997) A matrix method for degree raising of B- Technology of Tsinghua Univer-
spline curves. Sci China (Series E) 40:71–81 sity of China as an Associate
Professor. He received his PhD
and MEng from Huazhong Uni-
versity of Science and Technol-
ogy (HUST) in 1990 and 1984, and his BEng from South China
University of Technology in 1982. Before joining Tsinghua
University, he was teaching as a TA first, then a lecturer at
HUST from late 1984–1990. His research interests include
computer graphics, CAGD, curves and surfaces, especially sub-
division surfaces and NURBS modeling, physics-based geo-
metric modeling, wavelets, medical visualization, surgical plan-
ning and simulation, virtual reality and intelligent and smart
CAD/CAM.

You might also like