CAGD-banner.gif
On-Line Geometric Modeling Notes
BERNSTEIN POLYNOMIALS


Overview

Polynomials are incredibly useful mathematical tools as they are simply defined, can be calculated quickly on computer systems and represent a tremendous variety of functions. They can be differentiated and integrated easily, and can be pieced together to form spline curves that can approximate any function to any accuracy desired. Most students are introducted to polynomials at a very early stage in their studies of mathematics, and would probably recall them in the form below:

$\displaystyle p(t) \: = \: a_n t^n + a_{n-1} t^{n-1} + \cdots + a_1 t + a_0
$

which represents a polynomial as a linear combination of certain elementary polynomials $ \left\{(1, t, t^2, ..., t^n \right\}$.

In general, any polynomial function that has degree less than or equal to $ n$, can be written in this way, and the reasons are simply

This basis, commonly called the power basis, is only one of an infinite number of bases for the space of polynomials.

In these notes we discuss another of the commonly used bases for the space of polynomials, the Bernstein basis, and discuss its many useful properties.

pdficonsmall.gif For a pdf version of these notes look here.


Bernstein Polynomials

The Bernstein polynomials of degree $ n$ are defined by

$\displaystyle B_{i,n} (t) \: = \: {n \choose i} t^i (1-t)^{n-i}
$

for $ i = 0,1,...,n$, where

$\displaystyle {n \choose i} \: = \: \frac{n!}{i! (n-i)!}
$

There are $ n+1$ $ n$th-degree Bernstein polynomials. For mathematical convenience, we usually set $ B_{i,n}
= 0$, if $ i<0$ or $ i>n$.

These polynomials are quite easy to write down: the coefficients $ {n \choose i}$ can be obtained from Pascal's triangle; the exponents on the $ t$ term increase by one as $ i$ increases; and the exponents on the $ (1-t)$ term decrease by one as $ i$ increases. In the simple cases, we obtain


A Recursive Definition of the Bernstein Polynomials

The Bernstein polynomials of degree $ n$ can be defined by blending together two Bernstein polynomials of degree $ n-1$. That is, the $ k$th $ n$th-degree Bernstein polynomial can be written as

$\displaystyle B_{k,n}(t) \: = \: (1-t) B_{k,n-1}(t) + t B_{k-1,n-1}(t)
$

To show this, we need only use the definition of the Bernstein polynomials and some simple algebra:

\begin{displaymath}\begin{aligned}(1-t) B_{k,n-1}(t) + t B_{k-1,n-1}(t) & = (1-t...
...n \choose k} t^{k} (1-t)^{n-k} \\  & = B_{k,n}(t) \end{aligned}\end{displaymath}


The Bernstein Polynomials are All Non-Negative

A function $ f(t)$ is non-negative over an interval $ [a,b]$ if $ f(t) \geq 0$ for $ t \in [a,b]$. In the case of the Bernstein polynomials of degree $ n$, each is non-negative over the interval $ [0,1]$. To show this we use the recursive definition property above and mathematical induction.

It is easily seen that the functions $ B_{0,1}(t) = 1-t$ and $ B_{1,1}(t) = t$ are both non-negative for $ 0 \leq t \leq 1$. If we assume that all Bernstein polynomials of degree less than $ k$ are non-negative, then by using the recursive definition of the Bernstein polynomial, we can write

$\displaystyle B_{i,k}(t) \: = \: (1-t) B_{i,k-1}(t) + t B_{i-1,k-1}(t) \\
$

and argue that $ B_{i,k}(t)$ is also non-negative for $ 0 \leq t \leq 1$, since all components on the right-hand side of the equation are non-negative components for $ 0 \leq t \leq 1$. By induction, all Bernstein polynomials are non-negative for $ 0 \leq t \leq 1$.

In this process, we have also shown that each of the Bernstein polynomials is positive when $ 0 < t < 1$.


The Bernstein Polynomials form a Partition of Unity

A set of functions $ f_i(t)$ is said to partition unity if they sum to one for all values of $ t$. The $ k+1$ Bernstein polynomials of degree $ k$ form a partition of unity in that they all sum to one.

To show that this is true, it is easiest to first show a slightly different fact: for each $ k$, the sum of the $ k+1$ Bernstein polynomials of degree $ k$ is equal to the sum of the $ k$ Bernstein polynomials of degree $ k-1$. That is,

$\displaystyle \sum_{i=0}^k B_{i,k}(t) \: = \: \sum_{i=0}^{k-1} B_{i,k-1}(t)
$

This calculation is straightforward, using the recursive definition and cleverly rearranging the sums:

\begin{displaymath}\begin{aligned}\sum_{i=0}^{k} B_{i,k}(t) & = \sum_{i=0}^{k} \...
..._{i,k-1}(t) \\  & = \sum_{i=0}^{k-1} B_{i,k-1}(t) \end{aligned}\end{displaymath}

(where we have utilized $ B_{k,k-1}(t) = B_{-1,k-1}(t) = 0$).

Once we have established this equality, it is simple to write

$\displaystyle \sum_{i=0}^{n} B_{i,n}(t) \: = \:
\sum_{i=0}^{n-1} B_{i,n-1}(t) \...
...) \: = \:
\cdots \: = \:
\sum_{i=0}^{1} B_{i,1}(t) \: = \: (1-t) + t \: = \: 1
$

The partition of unity is a very important property when utilizing Bernstein polynomials in geometric modeling and computer graphics. In particular, for any set of points $ {\bf P} _0$, $ {\bf P} _1$, $ ...$, $ {\bf P} _n$, in three-dimensional space, and for any $ t$, the expression

$\displaystyle {\bf P} (t) =
{\bf P} _0 B_{0,n}(t) +
{\bf P} _1 B_{1,n}(t) +
\cdots +
{\bf P} _n B_{n,n}(t)
$

is an affine combination of the set of points $ {\bf P} _0, {\bf P} _1, ..., {\bf P} _n$ and if $ 0 \leq t \leq 1$, it is a convex combination of the points.


Degree Raising

Any of the lower-degree Bernstein polynomials (degree $ <$ $ n$) can be expressed as a linear combination of Bernstein polynomials of degree $ n$. In particular, any Bernstein polynomial of degree $ n-1$ can be written as a linear combination of Bernstein polynomials of degree $ n$. We first note that

\begin{displaymath}\begin{aligned}t B_{i,n}(t) & = {n \choose i} t^{i+1} ( 1-t )...
...+1,n+1}(t) \\  & = \frac{i+1}{n+1} B_{i+1,n+1}(t) \end{aligned}\end{displaymath}

and

\begin{displaymath}\begin{aligned}(1-t) B_{i,n}(t) & = {n \choose i} t^{i} ( 1-t...
...{i,n+1}(t) \\  & = \frac{n-i+1}{n+1} B_{i,n+1}(t) \end{aligned}\end{displaymath}

and finally

\begin{displaymath}\begin{aligned}\frac{1}{{n \choose i}}B_{i,n}(t) + \frac{1}{{...
...-1} \\  & = \frac{1}{{n-1 \choose i}}B_{i,n-1}(t) \end{aligned}\end{displaymath}

Using this final equation, we can write an arbitrary Bernstein polynomial in terms of Bernstein polynomials of higher degree. That is,

\begin{displaymath}\begin{aligned}B_{i,n-1}(t) & = {n-1 \choose i} \left[ \frac{...
...n}(t) + \left( \frac{i+1}{n} \right) B_{i+1,n}(t) \end{aligned}\end{displaymath}

which expresses a Bernstein polynomial of degree $ n-1$ in terms of a linear combination of Bernstein polynomials of degree $ n$. We can easily extend this to show that any Bernstein polynomial of degree $ k$ (less than $ n$) can be written as a linear combination of Bernstein polynomials of degree $ n$ - e.g., a Bernstein polynomial of degree $ n-2$ can be expressed as a linear combination of two Bernstein polynomials of degree $ n-1$, each of which can be expressed as a linear combination of two Bernstein polynomials of degree $ n$, etc.


Converting from the Bernstein Basis to the Power Basis

Since the power basis $ \{ 1, t, t^2, ..., t^n\}$ forms a basis for the space of polynomials of degree less than or equal to $ n$, any Bernstein polynomial of degree $ n$ can be written in terms of the power basis. This can be directly calculated using the definition of the Bernstein polynomials and the binomial theorem, as follows:

\begin{displaymath}\begin{aligned}B_{k,n}(t) & = {n \choose k} t^k (1-t)^{n-k} \...
...k}^{n} (-1)^{i-k} {n \choose i} {i \choose k} t^i \end{aligned}\end{displaymath}

where we have used the binomial theorem to expand $ (1-t)^{n-k}$.

To show that each power basis element can be written as a linear combination of Bernstein Polynomials, we use the degree elevation formulas and induction to calculate:

\begin{displaymath}\begin{aligned}t^k & = t ( t^{k-1} ) \\  & = t \sum_{i=k-1}^{...
...} \frac{{i \choose k}}{{n \choose k}} B_{i,n}(t), \end{aligned}\end{displaymath}

where the induction hypothesis was used in the second step.


Derivatives

Derivatives of the $ n$th degree Bernstein polynomials are polynomials of degree $ n-1$. Using the definition of the Bernstein polynomial we can show that this derivative can be written as a linear combination of Bernstein polynomials. In particular

$\displaystyle \frac{d}{dt} B_{k,n} (t) \: = \:
n ( B_{k-1,n-1} (t) - B_{k,n-1} (t) )
$

for $ 0 \leq k \leq n$. This can be shown by direct differentiation

\begin{displaymath}\begin{aligned}\frac{d}{dt} B_{k,n} (t) & = \frac{d}{dt} {n \...
... = n \left( B_{k-1,n-1}(t) - B_{k,n-1}(t) \right) \end{aligned}\end{displaymath}

That is, the derivative of a Bernstein polynomial can be expressed as the degree of the polynomial, multiplied by the difference of two Bernstein polynomials of degree $ n-1$.


The Bernstein Polynomials as a Basis

Why do the Bernstein polynomials of order $ n$ form a basis for the space of polynomials of degree less than or equal to $ n$?

1.
They span the space of polynomials - any polynomial of degree less than or equal to $ n$ can be written as a linear combination of the Bernstein polynomials.

This is easily seen if one realizes that The power basis spans the space of polynomials and any member of the power basis can be written as a linear combination of Bernstein polynomials.

2.
They are linearly independent - that is, if there exist constants $ c_0, c_1, ..., c_n$ so that the identity

$\displaystyle 0 \: = \: c_0 B_{0,n}(t) + c_1 B_{1,n}(t) + \cdots + c_n B_{n,n}(t)
$

holds for all $ t$, then all the $ c_i$'s must be zero.

If this were true, then we could write

\begin{displaymath}\begin{aligned}0 & = c_0 B_{0,n}(t) + c_1 B_{1,n}(t) + \cdots...
...}^{n} c_i {n \choose n} {n \choose n} \right] t^n \end{aligned}\end{displaymath}

Since the power basis is a linearly independent set, we must have that

\begin{displaymath}\begin{aligned}c_0 & = 0 \\  \sum_{i=0}^{1} c_i {n \choose 1}...
...m_{i=0}^{n} c_i {n \choose n} {n \choose n} & = 0 \end{aligned}\end{displaymath}

which implies that $ c_0 = c_1 = \cdots = c_n = 0$ ($ c_0$ is clearly zero, substituting this in the second equation gives $ c_1 = 0$, substituting these two into the third equation gives ...)


A Matrix Representation for Bernstein Polynomials

In many applications, a matrix formulation for the Bernstein polynomials is useful. These are straightforward to develop if one only looks at a linear combination in terms of dot products.

Given a polynomial written as a linear combination of the Bernstein basis functions

$\displaystyle B(t) \: = \:
c_0 B_{0,n}(t) +
c_1 B_{1,n}(t) +
\cdots +
c_n B_{n,n}(t)
$

It is easy to write this as a dot product of two vectors

$\displaystyle B(t) \: = \:
\left[ \begin{array}{cccc}
B_{0,n}(t) & B_{1,n}(t) &...
...
\left[ \begin{array}{cccc}
c_0 \\  c_1 \\  \vdots \\  c_n
\end{array} \right]
$

We can convert this to

$\displaystyle B(t) \: = \:
\left[ \begin{array}{ccccc}
1 & t & t^2 & \cdots & t...
...begin{array}{c}
c_0 \\
c_1 \\
c_2 \\
\vdots \\
c_n
\end{array} \right]
$

where the $ b_{i,j}$ are the coefficients of the power basis that are used to determine the respective Bernstein polynomials. We note that the matrix in this case is lower triangular.

In the quadratic case ($ n=2$), the matrix representation is

$\displaystyle B(t) \: = \:
\left[ \begin{array}{ccc}
1 & t & t^2
\end{array} \...
...y} \right]
\left[ \begin{array}{ccc}
c_0 \\
c_1 \\
c_2
\end{array} \right]
$

and in the cubic case ($ n=3$), the matrix representation is

$\displaystyle B(t) \: = \:
\left[ \begin{array}{cccc}
1 & t & t^2 & t^3
\end{ar...
...
\left[ \begin{array}{cccc}
c_0 \\
c_1 \\
c_2 \\
c_3
\end{array} \right]
$


\begin{singlespace}
\noindent
\footnotesize\bfseries All contents copyright (c) ...
...ment, University of California, Davis \\
All rights reserved.
\end{singlespace}


Ken Joy
2000-11-28