Bernštein Polynomials and Bézier Curves

4.4.1 Bernštein Polynomials and Bézier Curves

In the following we restrict ourselves to considering polynomial curves, i.e., one-dimensional geometric objects. Parametric curves are often used to find the functional form of a curve given geometrically by a set of points p i

∈R d , i = 0 : n.

Let c(t) ∈ R d , t ∈ [0, 1], be a parametric curve. In the simplest case, n = 1, we take c(t) to be linear,

c(t ) = (1 − t)p 0 + tp 1 ,

and connecting the two points p 0 and p 1 so that p 0 = c(0) and p 1 = c(1). For n > 1 this will not give a smooth curve and is therefore of limited interest.

We now generalize this approach and take c(t) to be a polynomial of degree n, n

where B i (t ) , i = 0 : n, are the Bernštein polynomials 136 defined by

(4.4.1) Using the binomial theorem we have

Thus the Bernštein polynomials of degree n are nonnegative on [0, 1] and give a partition of unity .

For n = 3 the four cubic Bernštein polynomials are

B 3 0 3 = (1 − t) , B 3 2 3 2 3 1 3 = 3t (1 − t) , B 2 = 3t ( 1 − t), B 3 =t . (4.4.2) They are plotted in Figure 4.4.1.

136 Bernštein introduced the polynomials named after him in 1911.

412 Chapter 4. Interpolation and Approximation

Figure 4.4.1. The four cubic Bernštein polynomials.

Some important properties of the Bernštein polynomials are given in the following theorem.

Theorem 4.4.1.

The Bernštein polynomials B n i (t ) have the following properties:

1. B n i (t ) >

0, t ∈ (0, 1) (nonnegativity);

2. B n (t )

ni

=B n −i ( 1 − t) (symmetry);

3. B n i (t ) = 0 has a root t = 0 of multiplicity i and a root t = 1 of multiplicity n − i;

4. The Bernštein polynomials B n i (t ) have a unique maximum value at t = i/n on [0, 1];

5. The Bernštein polynomials satisfy the following recursion formula:

i (t ) = (1 − t)B i −1 (t ) + tB i −1 −1 (t ), i = 0 : n; (4.4.3)

6. The Bernštein polynomials of degree n form a basis for the space of polynomials of degree ≤ n.

Proof. The first four properties follow directly from the definition (4.4.1). The recursion formula is a consequence of the relation

between the binomial coefficients. To show the linear independence we observe that if

a i B n i (t ) = 0,

i =0

4.4. Piecewise Polynomial Interpolation 413 then according to property 3,

B i n ( 1) = a n i ( 1) = a n = 0.

i =0

By repeatedly dividing by (1 − t) and using the same argument we find that a 0 =···=

a n −1 =a n = 0. The unique parametric Bézier curve corresponding to a given set of n + 1 control

points p i , i = 0 : n, equals

where B n i (t ) are Bernštein polynomials of degree n. By property 3 in Theorem 4.4.1 the Bézier curve interpolates the first and last control points p 0 and p n . Often a curve is constructed by smoothly patching together several Bézier curves of low order. Starting with B 0 0 n (t ) n = 1 and setting B −1 (t ) =B n +1 (t ) = 0, the recursion in Theo- rem 4.4.1 can be used to evaluate the Bernštein polynomials at a given point t. It follows directly from the form of (4.4.4) that applying an affine transformation to c(t ) can be performed simply by applying the same transformation to the control points. Hence the Bézier curve has the desirable property that it is invariant under translations and rotations.

Example 4.4.1.

A quadratic Bézier curve is given by c(t )

2 = (1 − t) 2 p 0 + 2t (1 − t)p 1 +t p 2 , t ∈ [0, 1].

Clearly c(0) = p 0 and c(1) = p 2 . For t = 1/2 we get

c = +p +p 1 .

Hence we can construct the point c(1/2) geometrically as the intersection between the midpoint of the line between p 0 and p 2 and the point p 1 ; see Figure 4.4.2.

The Bézier polygon is the closed piecewise linear curve connecting the control points p i and p i +1 , i = 0 : n − 1, and finally p n and back to p 0 . In Figures 4.4.2 and 4.4.3 this is the polygon formed by the dashed lines. This polygon provides a rough idea of the shape of the Bézier curve.

From the definition (4.4.4) of the Bézier curve it follows that for all t ∈ [0, 1], the curve c(t) is a convex combination of the control points. Therefore, c(t) lies within the

convex hull (see Definition 4.3.2) of the control points. The variation of a function in an interval [a, b] is the least upper bound on the sum of

the oscillations in the closed subintervals [a, x 1 ], [x 1 ,x 2 ], . . . , [x n ,b ] for all possible such

414 Chapter 4. Interpolation and Approximation

Figure 4.4.2. Quadratic Bézier curve with control points.

Figure 4.4.3. Cubic Bézier curve with control points p 0 ,...,p 3 . subdivisions. The Bézier curve is variation diminishing. In particular, if the control points

p i are monotonic, so is c(t). Usually, not all control points are known in advance. The shape of the curve is controlled by moving the control points until the curve has the desired shape. For example, in the quadratic case moving p 1 has a direct and intuitive effect on the curve c(t). An advantage of the Bernštein basis for representing polynomials is that the coefficients (control points) are closely related to the shape of the curve. This is not the case when using a monomial or Chebyshev basis.

Theorem 4.4.2.

The Bézier curve c(t) is tangent to p 1 −p 0 and p n −p n −1 for t = 0 and t = 1, respectively.

Proof. To show this we compute the derivative of the Bernštein polynomial (4.4.1):

 −nB −1 0 n (t )

if i = 0,

if 0 < i < n, dt

B i (t )

n B = −1 i (t )

−B −1

n −1

(t )

nB n −1 −1 (t )

if i = n.

4.4. Piecewise Polynomial Interpolation 415 This follows from

n −i−1

dt

d B and using the definition of the Bernštein polynomials. Setting t = 0 we find that n

i ( 0) =

0, i > 1, and therefore from (4.4.4)

dt

d c(t ) = n(p 1 −p 0 ). dt

The result for t = 1 follows from symmetry. More generally, at a boundary point the kth derivative of the Bézier curve depends

only on the k closest control points. This fact is useful for smoothly joining together several pieces of Bézier curves.

De Casteljau’s Algorithm

To evaluate the Bézier curve at t ∈ [0, 1] we use the recursion formula (4.4.3) to obtain

Here we have introduced the new auxiliary control points p ( 1)

(t ) = (1 − t)p i + tp i +1 , i = 0 : n − 1, as convex combinations (depending on t) of the original control points. Using this result

we can successively lower the grade of the Bernštein polynomial until we arrive at B 0 0 = 1. This gives de Casteljau’s algorithm, a recursion scheme for the auxiliary control points

p ( 0)

i (t ) =p i , i = 0 : n,

i (t ) = (1 − t)p i (t ) + tp i +1 (t ), i = 0 : n − r. (4.4.5) It follows that

and in particular c(t) = p (n)

416Chapter 4. Interpolation and Approximation De Casteljau’s algorithm works by building convex combinations (4.4.5) and is there-

fore numerically very stable. It can conveniently be arranged in a triangular array.

The algorithm uses about n 2 operations and so is less efficient than Horner’s algorithm for evaluating a polynomial in the monomial basis. The kth derivative of c(t) is also available from the de Casteljau scheme. It holds that

2 − 2p 1 +p 0 ,..., and in general

0 ≤ k ≤ n, (4.4.8)

(n − k)!

where the difference operates on the lower index i. De Casteljau’s algorithm is illustrated for the quadratic case in Figure 4.4.4, where the following geometric interpretation can be observed. In the interval [0, t] the Bézier curve is ( (

represented by a quadratic spline with control points p 0 ,p 1) 0 ,p 2) 0 . In the remaining interval

[t, 1] it is represented by a quadratic spline with control points p (

0 ,p 1) 1 ,p 2 . Note that these

De Casteljau’s algorithm for n = 2, t = 1

4.4. Piecewise Polynomial Interpolation 417 two sets of control points lie closer to the curve c(t). After a few more subdivisions it will

be hard to distinguish the polygon joining the control points from the curve. De Casteljau’s algorithm can also be used to subdivide a Bézier curve into two seg- ments. By repeating this partitioning the Bézier polygons converge fast to the curve. This construction is very well suited to control, for example, a milling machine which can only remove materiel.

Dokumen yang terkait

Analisis Komparasi Internet Financial Local Government Reporting Pada Website Resmi Kabupaten dan Kota di Jawa Timur The Comparison Analysis of Internet Financial Local Government Reporting on Official Website of Regency and City in East Java

19 819 7

ANTARA IDEALISME DAN KENYATAAN: KEBIJAKAN PENDIDIKAN TIONGHOA PERANAKAN DI SURABAYA PADA MASA PENDUDUKAN JEPANG TAHUN 1942-1945 Between Idealism and Reality: Education Policy of Chinese in Surabaya in the Japanese Era at 1942-1945)

1 29 9

Improving the Eighth Year Students' Tense Achievement and Active Participation by Giving Positive Reinforcement at SMPN 1 Silo in the 2013/2014 Academic Year

7 202 3

An Analysis of illocutionary acts in Sherlock Holmes movie

27 148 96

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

The correlation between listening skill and pronunciation accuracy : a case study in the firt year of smk vocation higt school pupita bangsa ciputat school year 2005-2006

9 128 37

Existentialism of Jack in David Fincher’s Fight Club Film

5 71 55

Phase response analysis during in vivo l 001

2 30 2

The Risk and Trust Factors in Relation to the Consumer Buying Decision Process Model

0 0 15

PENERAPAN ADING (AUTOMATIC FEEDING) PINTAR DALAM BUDIDAYA IKAN PADA KELOMPOK PETANI IKAN SEKITAR SUNGAI IRIGASI DI KELURAHAN KOMET RAYA, BANJARBARU Implementation of Ading (Automatic Feeding) Pintar in Fish Farming on Group of Farmer Close to River Irriga

0 0 5