Game Development Reference

In-Depth Information

11.3 Bézier Curves

Although we shall limit ourselves to studying the cubic variety, a Bézier (pro-

nounced BAY-ZEE-AY) curve can be defined for any polynomial degree
n
. Giv-

en

points
0
,,,
n

PP

, called the
control points
of the curve, the degree
n

n

+

1

()

Bézier curve

B

t

is given by the parametric function

n

()

()

B

t

=

B

t

P
,

(11.16)

nk

,

k

k

=

0

()

t
are the
Bernstein polynomials
defined by

where the blending functions

B

nk

n

nk

−

k

(

)

B

=

t

1

−

t

(11.17)

nk

,

k

with the binomial coefficient

n

n

!

=

.

(11.18)

(

)

k

kn k

!

−

!

The first and last control points,
P
and
P
, are interpolated by the curve, and the

interior control points
12

PP
are approximated by the curve. The Bern-

stein polynomials can be generated by the recurrence relation

,

,

,

n

−

1

() (

)

B

t

=−

1

t B

+

tB

,

(11.19)

nk

,

nk

−−

1,

1

nk

−

1,

where

. As shown in Figure 11.3,

this recurrence resembles Pascal's triangle, but with the modification that each

value is the weighted average of the two closest values above it instead of the

sum.

B

=

1

, and

B

=

0

whenever

<

0

or
k

>

n

k

0,0

nk

,

11.3.1 Cubic Bézier Curves

The cubic Bézier curve has four control points whose positions are blended to-

gether by evaluating Equation (11.16) for

n

=

3

:

3

()

()

B

t

=

B

t

P

3,

k

k

k

=

0

(

)

3

(

)

2

2

(

)

3

=−

1

t

P

+

3

t

1

−

t

P

+

3

t

1

−

t

P

+

t

P
.

(11.20)

0

1

2

3

Search Nedrilad ::

Custom Search