On-Lne Geometrc Modelng Notes BERNSTEIN POLYNOMIALS Kenneth I. Joy Vsualzaton and Graphcs Research Group Department of Computer Scence Unversty of Calforna, Davs Overvew Polynomals are ncredbly useful mathematcal tools as they are smply defned, can be calculated quckly on computer systems and represent a tremendous varety of functons. They can be dfferentated and ntegrated easly, and can be peced together to form splne curves that can approxmate any functon to any accuracy desred. Most students are ntroducted to polynomals at a very early stage n ther studes of mathematcs, and would probably recall them n the form below: p(t a n t n + a n 1 t n 1 + + a 1 t + a 0 whch represents a polynomal as a lnear combnaton of certan elementary polynomals { (1, t, t 2,..., t n}. In general, any polynomal functon that has degree less than or equal to n, can be wrtten n ths way, and the reasons are smply The set of polynomals of degree less than or equal to n forms a vector space: polynomals can be added together, can be multpled by a scalar, and all the vector space propertes hold. The set of functons { 1, t, t 2,..., t n} form a bass for ths vector space that s, any polynomal of degree less than or equal to n can be unquely wrtten as a lnear combnatons of these functons. Ths bass, commonly called the power bass, s only one of an nfnte number of bases for the space of polynomals. In these notes we dscuss another of the commonly used bases for the space of polynomals, the Bernsten bass, and dscuss ts many useful propertes.
Bernsten Polynomals The Bernsten polynomals of degree n are defned by for 0, 1,..., n, where B,n (t ( n ( n t (1 t n n!!(n! There are n + 1 nth-degree Bernsten polynomals. For mathematcal convenence, we usually set B,n 0, f < 0 or > n. These polynomals are qute easy to wrte down: the coeffcents can be obtaned from Pascal s trangle; the exponents on the t term ncrease by one as ncreases; and the exponents on the (1 t term decrease by one as ncreases. In the smple cases, we obtan The Bernsten polynomals of degree 1 are and can be plotted for 0 t 1 as B 0,1 (t 1 t B 1,1 (t t 2
The Bernsten polynomals of degree 2 are B 0,2 (t (1 t 2 B 1,2 (t 2t(1 t B 2,2 (t t 2 and can be plotted for 0 t 1 as The Bernsten polynomals of degree 3 are B 0,3 (t (1 t 3 B 1,3 (t 3t(1 t 2 B 2,3 (t 3t 2 (1 t B 3,3 (t t 3 and can be plotted for 0 t 1 as 3
!"# "$%& 4
A Recursve Defnton of the Bernsten Polynomals The Bernsten polynomals of degree n can be defned by blendng together two Bernsten polynomals of degree n 1. That s, the kth nth-degree Bernsten polynomal can be wrtten as B k,n (t (1 tb k,n 1 (t + tb k 1,n 1 (t To show ths, we need only use the defnton of the Bernsten polynomals and some smple algebra: ( ( n 1 n 1 (1 tb k,n 1 (t + tb k 1,n 1 (t (1 t t k (1 t n 1 k + t t k 1 (1 t n 1 (k 1 k k 1 ( ( n 1 n 1 t k (1 t n k + t k (1 t n k k k 1 [( ( ] n 1 n 1 + t k (1 t n k k k 1 ( n t k (1 t n k k B k,n (t The Bernsten Polynomals are All Non-Negatve A functon f(t s non-negatve over an nterval [a, b] f f(t 0 for t [a, b]. In the case of the Bernsten polynomals of degree n, each s non-negatve over the nterval [0, 1]. To show ths we use the recursve defnton property above and mathematcal nducton. It s easly seen that the functons B 0,1 (t 1 t and B 1,1 (t t are both non-negatve for 0 t 1. If we assume that all Bernsten polynomals of degree less than k are non-negatve, then by usng the recursve defnton of the Bernsten polynomal, we can wrte B,k (t (1 tb,k 1 (t + tb 1,k 1 (t and argue that B,k (t s also non-negatve for 0 t 1, snce all components on the rght-hand sde of the equaton are non-negatve components for 0 t 1. By nducton, all Bernsten polynomals are non-negatve for 0 t 1. In ths process, we have also shown that each of the Bernsten polynomals s postve when 0 < t < 1. 5
The Bernsten Polynomals form a Partton of Unty A set of functons f (t s sad to partton unty f they sum to one for all values of t. The k+1 Bernsten polynomals of degree k form a partton of unty n that they all sum to one. To show that ths s true, t s easest to frst show a slghtly dfferent fact: for each k, the sum of the k + 1 Bernsten polynomals of degree k s equal to the sum of the k Bernsten polynomals of degree k 1. That s, k B,k (t k 1 B,k 1 (t Ths calculaton s straghtforward, usng the recursve defnton and cleverly rearrangng the sums: k B,k (t k [(1 tb,k 1 (t + tb 1,k 1 (t] (1 t ] [ k ] B,k 1 (t + B k,k 1 (t + t B 1,k 1 (t + B 1,k 1 (t [ k 1 k 1 (1 t B,k 1 (t + t k B 1,k 1 (t 1 k 1 k 1 (1 t B,k 1 (t + t B,k 1 (t k 1 B,k 1 (t (where we have utlzed B k,k 1 (t B 1,k 1 (t 0. Once we have establshed ths equalty, t s smple to wrte 1 B,n (t n 1 B,n 1 (t n 2 B,n 2 (t 1 B,1 (t (1 t + t 1 The partton of unty s a very mportant property when utlzng Bernsten polynomals n geometrc modelng and computer graphcs. In partcular, for any set of ponts P 0, P 1,..., P n, n three-dmensonal space, and for any t, the expresson P(t P 0 B 0,n (t + P 1 B 1,n (t + + P n B n,n (t 6
s an affne combnaton of the set of ponts P 0, P 1,..., P n and f 0 t 1, t s a convex combnaton of the ponts. Degree Rasng Any of the lower-degree Bernsten polynomals (degree < n can be expressed as a lnear combnaton of Bernsten polynomals of degree n. In partcular, any Bernsten polynomal of degree n 1 can be wrtten as a lnear combnaton of Bernsten polynomals of degree n. We frst note that ( n tb,n (t t +1 (1 t n ( n t +1 (1 t (n+1 (+1 +1 B +1,n+1 (t + + 1 n + 1 B +1,n+1(t and ( n (1 tb,n (t t (1 t n+1 +1 B,n+1 (t n + 1 n + 1 B,n+1(t and fnally 1 B,n (t + 1 B +1,n (t t (1 t n + t +1 (1 t n (+1 +1 t (1 t n 1 ((1 t + t t (1 t n 1 1 1 B,n 1 (t Usng ths fnal equaton, we can wrte an arbtrary Bernsten polynomal n terms of Bernsten polynomals 7
of hgher degree. That s, 1 B,n 1 (t n [ 1 (n ] B,n (t + 1 B +1,n (t B,n (t + ( + 1 n +1 B +1,n (t whch expresses a Bernsten polynomal of degree n 1 n terms of a lnear combnaton of Bernsten polynomals of degree n. We can easly extend ths to show that any Bernsten polynomal of degree k (less than n can be wrtten as a lnear combnaton of Bernsten polynomals of degree n e.g., a Bernsten polynomal of degree n 2 can be expressed as a lnear combnaton of two Bernsten polynomals of degree n 1, each of whch can be expressed as a lnear combnaton of two Bernsten polynomals of degree n, etc. Convertng from the Bernsten Bass to the Power Bass Snce the power bass {1, t, t 2,..., t n } forms a bass for the space of polynomals of degree less than or equal to n, any Bernsten polynomal of degree n can be wrtten n terms of the power bass. Ths can be drectly calculated usng the defnton of the Bernsten polynomals and the bnomal theorem, as follows: B k,n (t k k t k (1 t n k t k n k n k ( 1 k ( n k ( 1 t ( n k t +k ( n k ( 1 k k k ( ( n ( 1 k t k where we have used the bnomal theorem to expand (1 t n k. k k To show that each power bass element can be wrtten as a lnear combnaton of Bernsten Polynomals, t 8
we use the degree elevaton formulas and nducton to calculate: t k t(t k 1 t ( k 1 k 1 k 1 1 k 1 1 k k 1 ( n 1 k 1 k 1 k 1 n 1 k 1 ( k B,n 1 (t tb 1,n 1 (t n B,n(t kb,n (t, where the nducton hypothess was used n the second step. Dervatves Dervatves of the nth degree Bernsten polynomals are polynomals of degree n 1. Usng the defnton of the Bernsten polynomal we can show that ths dervatve can be wrtten as a lnear combnaton of Bernsten polynomals. In partcular d dt B k,n(t n(b k 1,n 1 (t B k,n 1 (t for 0 k n. Ths can be shown by drect dfferentaton d dt B k,n(t d dt ( n t k (1 t n k k kn! k!(n k! tk 1 (1 t n k + n(n 1! (k 1!(n k! tk 1 (1 t n k + ( (n 1! n (k 1!(n k! tk 1 (1 t n k + n (B k 1,n 1 (t B k,n 1 (t (n kn! k!(n k! tk (1 t n k 1 n(n 1! k!(n k 1! tk (1 t n k 1 (n 1! k!(n k 1! tk (1 t n k 1 9
That s, the dervatve of a Bernsten polynomal can be expressed as the degree of the polynomal, multpled by the dfference of two Bernsten polynomals of degree n 1. The Bernsten Polynomals as a Bass Why do the Bernsten polynomals of order n form a bass for the space of polynomals of degree less than or equal to n? 1. They span the space of polynomals any polynomal of degree less than or equal to n can be wrtten as a lnear combnaton of the Bernsten polynomals. Ths s easly seen f one realzes that The power bass spans the space of polynomals and any member of the power bass can be wrtten as a lnear combnaton of Bernsten polynomals. 2. They are lnearly ndependent that s, f there exst constants c 0, c 1,..., c n so that the dentty 0 c 0 B 0,n (t + c 1 B 1,n (t + + c n B n,n (t holds for all t, then all the c s must be zero. If ths were true, then we could wrte 0 c 0 B 0,n (t + c 1 B 1,n (t + + c n B n,n (t ( ( n ( ( n c 0 ( 1 t + c 1 ( 1 1 t + + c n 0 1 1 [ 1 ( ( ] [ ( ( ] n 1 n n c 0 + c t 1 + + c t n 1 1 n n Snce the power bass s a lnearly ndependent set, we must have that ( ( n ( 1 n t n n c 0 0 1 ( ( n 1 c 0 1 1. ( ( n n c 0 n n whch mples that c 0 c 1 c n 0 (c 0 s clearly zero, substtutng ths n the second equaton 10
gves c 1 0, substtutng these two nto the thrd equaton gves... 11
A Matrx Representaton for Bernsten Polynomals In many applcatons, a matrx formulaton for the Bernsten polynomals s useful. These are straghtforward to develop f one only looks at a lnear combnaton n terms of dot products. Gven a polynomal wrtten as a lnear combnaton of the Bernsten bass functons B(t c 0 B 0,n (t + c 1 B 1,n (t + + c n B n,n (t It s easy to wrte ths as a dot product of two vectors B(t [ B 0,n (t B 1,n (t B n,n (t ] c 0 c 1. c n We can convert ths to B(t [ 1 t t 2 ] t n b 0,0 0 0 0 b 1,0 b 1,1 0 0 b 2,0 b 2,1 b 2,2 0....... c 0 c 1 c 2. b n,0 b n,1 b n,2 b n,n c n where the b,j are the coeffcents of the power bass that are used to determne the respectve Bernsten polynomals. We note that the matrx n ths case s lower trangular. In the quadratc case (n 2, the matrx representaton s [ ] 1 0 0 B(t 1 t t 2 2 2 0 1 2 1 c 0 c 1 c 2 12
and n the cubc case (n 3, the matrx representaton s B(t [ 1 t t 2 ] t 3 1 0 0 0 3 3 0 0 3 6 3 0 1 3 3 1 c 0 c 1 c 2 c 3 All contents copyrght (c 1996, 1997, 1998, 1999, 2000 Computer Scence Department, Unversty of Calforna, Davs All rghts reserved. 13