0% found this document useful (0 votes)
25 views

Bezier Curves: P1 P2 T: 1 T

The document describes Bezier curves and their properties. It begins by explaining the de Casteljau algorithm for evaluating Bezier curves using control points. A Bezier curve starts and ends at its first and last control points. The tangent vectors at the endpoints are defined by the first two and last two control points. It then derives the explicit formula for Bezier curves as a weighted sum of the control points, where the weights come from expanding (1-t+t)n-1. The curve lies within the convex hull of the control points. Smooth joining of Bezier curves requires overlapping endpoints. The document concludes by introducing polar representations of polynomial curves.

Uploaded by

Ivek Rupa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Bezier Curves: P1 P2 T: 1 T

The document describes Bezier curves and their properties. It begins by explaining the de Casteljau algorithm for evaluating Bezier curves using control points. A Bezier curve starts and ends at its first and last control points. The tangent vectors at the endpoints are defined by the first two and last two control points. It then derives the explicit formula for Bezier curves as a weighted sum of the control points, where the weights come from expanding (1-t+t)n-1. The curve lies within the convex hull of the control points. Smooth joining of Bezier curves requires overlapping endpoints. The document concludes by introducing polar representations of polynomial curves.

Uploaded by

Ivek Rupa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

P1 P2

P3
P0
t

:

1

t
t

:

1

t
t : 1

t
t : 1

t
t

:

1

t
P01
P23
P0123=B(t)
t : 1t
P12 P123
P012
Figure 1: De Casteljau algorithm. The control points P
0
, P
1
, P
2
and P
3
are joined with line segments
(shown in red; those red intervals form something called control polygon, even though they are not really
a polygon but rather a polygonal curve). Each of them is then divided in the same ratio t : 1 t, giving
rise to the green points P
01
, P
12
and P
23
. Again, each consecutive two green points are joined with line
segments which are subdivided with blue points P
012
and P
123
. After the interval joining the blue points
is subdivided, only one point is left (here: the black one). This is the location of our moving point at time
t. The trajectory of that point for times between 0 and 1 is the Bezier curve. Of course, the more control
points the more colors I would need to use, i.e. the more the levels of subdivision are needed.
Bezier Curves
Curves are trajectories of moving points. Well specify them as functions assigning a location of that
moving point (in 2D or 3D) to a parameter t (think of it as time). In general, all curves we are going to
talk about will be dened by a sequence of control points. Curves useful in in geometric modeling should
have shape which has a clear and intuitive relation to the path of the sequence of control points. One
family of curves satisfying this requirement are Bezier Curves.
1 Denition and a few formulas and properties
A Bezier curve is dened by a sequence of N + 1 control points, P
0
, P
1
, . . . , P
N
. We dened the
Bezier curve using the de Casteljau algorithm, based on recursive splitting of the intervals joining the
consecutive control points (Figure 1). It should be clear from the picture that B
P0P1...PN
(0) = P
0
and
B
P0P1...PN
(1) = P
N
, i.e. the curve starts at the rst and ends at the last control point (think what it
means to split in 1:0 or 0:1 ratio...).

P
0
P
1
and

P
N1
P
N
are tangent vectors to the curve at its endpoints
(Figure 2; also easily visible in the unrelated Figure 3). The latter will be straightforward to verify once
we have an explicit formula for the Bezier curve at the end of this section. In general, if P
0
, P
1
, . . . , P
n
are control points for the curve then B

(0) = n

P
0
P
1
and B

(1) = n

P
n1
P
n
.
Notice that the endpoints of the interval which is split as the last one (the blue one in Figure 1) are points
of Bezier curves dened by sequences of control points P
0
P
1
. . . P
N1
and P
1
P
2
. . . P
N
. This leads to the
formula
B
P0P1...PN
(t) = (1 t) B
P0P1...PN1
(t) +t B
P1P2...PN
(t).
Remembering that for just one control point we have constant Bezier curve i.e. B
P0
(t) = P
0
, we can use
1
Figure 2: Bezier curves; black dots are the control points and the curve is shown in blue. Both curves
have 4 control points and therefore are given by cubic polynomials. Notice that the interval joining the
rst two control points is tangent to the curve at its starting point and the line joining the last two control
points is tangent to the curve at its nal point.
the above equation to derive an explicit formula for a B-spline curve of any degree. Heres how:
B
P0P1
= (1 t) B
P0
+t B
P1
= (1 t) P
0
+t P
1
having this:
B
P0P1P2
= (1 t) B
P0P1
+t B
P1P2
=
= (1 t) ((1 t) P
0
+t P
1
) +t ((1 t) P
1
+t P
2
) =
= (1 t)
2
P
0
+ 2t(1 t) P
1
+t
2
P
2
.
Its not hard to guess that, in general, to evaluate B
P0P1...PN
we need to weight the consecutive control
points with the terms of the expansion of ((1 t) +t)
N1
. That is, the weight sequences are (see above)
1 (for N = 0); (1 t), t (N = 1); (1 t)
2
, 2t(1 t), t
2
(N = 2); and (1 t)
3
, 3(1 t)
2
t, 3(1 t)t
2
, t
3
for
N = 3.
The weights (as functions of t) for a xed N are called Bezier basis functions of degree N. Note that this
is indeed a basis (in the linear algebra sense) for the space of all polynomials: in fact, every polynomial
curve can be expressed as a Bezier curve for a certain control point. Thus, Bezier curves of degree d are
exactly polynomial curves of degree d. This might seem a bit disappointing at rst, but remember that
what we gain is an intuitive way to control the curves shape based on control points. Check out one of
the applets to experience this.
If we have 5 control points, then the weights are (1 t)
4
, 4t(1 t)
3
, 6t
2
(1 t)
2
, 4t
3
(1 t), t
4
. Thus, the
formula for the B-spline curve (which is a degree-4 polynomial in this case) is
B
P0P1P2P3P4
= (1 t)
4
P
0
+ 4t(1 t)
3
P
1
+ 6t
2
(1 t)
2
P
2
+ 4t
3
(1 t) P
3
+t
4
P
4
.
Notice that this means that each point on a Bezier curve is a weighted average of the input points.
2
P0
P1
P2
P3
P4
P5
P6
Figure 3: The control polygon is shown red. The convex hull of the control points is the green polygon
(smallest convex having all the control points inside). The Bezier curve is shown in blue. The convex hull
property states that blue has to be contained inside the green polygon.
Therefore, it lies inside the convex hull of the control points, i.e. the smallest convex polygon enclosing
them (see Figure 3).
2 Joining Bezier segments
Based on the previous section, it is not hard to gure out how to join two or more Bezier curves so that
they all form a smooth curve. Figure 4 explains it all.
3 Polar representations of polynomial curves
Polar forms provide a very powerful formalism for dening as well as manipulating and understanding
polynomial curves. In this section we discuss the basics of this approach.
3.1 Denition
Take any polynomial of one variable P and let d be an integer such that deg P d. Then, P can be
written in a unique way in the following form:
P(t) = M(t, t, . . . , t), (1)
where M is a symmetric and multiane function of d variables.
Symmetry means that permuting arguments does not change the value of M. Formally,
M(x
1
, x
2
, . . . , x
d
) = M(x
(1)
, x
(2)
, . . . , x
(d)
)
for any permutation of {1, 2, . . . , d}. For example, if d = 3, M(1, 1, 0) = M(0, 1, 1) = M(1, 0, 1). If
an argument x of M is repeated k times, instead of writing it k times, well just write x
k
. For example,
M(0, 0, 1) = M(0
2
, 1) = M(0
2
, 1
1
).
3
P0
P1
P2
P3=P0
P1
P2
P3
P0
P1
P2
P3=P0
P1
P2
P3
P0
P1
P2
P3=P0
P1
P2
P3
Figure 4: Joining two Bezier curves. Control points for one are red and for the other (primed) blue. We
want them to join, so the second one should start where the rst ends. Thus, the last control point of the
rst curve has to overlap with the rst of the second curve. This point is shown in magenta (=red+blue).
Top left: the vectors

P
2
P
3
and

P

0
P

1
are not collinear. Therefore, the red and blue curves have dierent
tangent lines at the point they meet at (magenta dot) and so they dont join smoothly there. Right:
the vectors are collinear now, but they point in dierent directions. So, the red curve arrives from one
direction, at the magenta point, but the blue one leaves in the opposite direction. This causes a very
(innitely?) sharp cusp in the curve. Bottom left: The vectors are parallel and they point in the same
direction; the two curves join smoothly.
Before we say what multiane means, lets dene what ane means for a function. Basically, a function
A : V W (V ,W are vector spaces) is ane if it preserves weighted averages:
A(x + (1 )y) = A(x) + (1 )A(y)
for any x, y in the domain and any scalar .
A function of several variables is multiane if it is ane with respect to every variable. Since our M has
to be symmetric (therefore we are free to permute the variables without changing the value), it is enough
to say that it has to be ane with respect to the rst variable:
M(x + (1 )y, x
2
, x
3
, . . . , x
d
) = M(x, x
2
, x
3
, . . . , x
d
) + (1 )M(y, x
2
, x
3
, . . . , x
d
).
In what follows, well call M a polar form or a blossom of P.
3.2 A few examples or polar forms
Example 1. Let P(t) = 1 +x + 2x
2
+x
3
and d=3. Then, the polar form of P is given by
M(x, y, z) = 1 +
1
3
(x +y +z) +
2
3
(xy +xz +yz) +xyz.
The equation P(t) = M(t, t, t) is straightforward to check. Symmetry is also easy to see (swapping any
two variables doesnt change the formula for M). Multianity is also not hard to see either: imagine you
4
x two variables, say, y and z, making them constants. Then, the formula for M reduces to a degree-1
polynomial in x:

1 +
1
3
(y +z) +
2
3
yz

1
3
+
2
3
(y +z) +yz

x.
Degree-1 polynomials are ane functions and therefore P is multiane.
Example 2. For the same polynomial P and d = 5, the polar form is
M(x, y, z, t, u) = 1 +
1
5
(x +y +z +t +u) +
2
10
(xy +xz +xt +xu +yz +yt +yu +zt +zu +tu) +
+
1
10
(xyz +xyt +xyu +xzt +xzu +xtu +yzt +yzu +ytu +ztu).
It is dierent from the polar form obtained in the previous example, but this does not contradict the
uniqueness of the polar form (since this one is based on a dierent d).
Conclusion. The general procedure for writing the polar form is to dene it as a linear combination of
symmetric polynomials of d variables. The symmetric polynomials of degree k and of d variables is simply
a sum of all possible products of k dierent variables. These expressions can get long fast, but good news
is that, in practice, one doesnt really need them.
3.3 Bezier curve blossoms
One reason that makes polar forms useful is that by putting constraints on them we can dene polynomials.
For many polynomial curves common in CAD/CAM systems the polar forms are particularly simple.
Bezier curve of degree d can, for example, be dened by the following constraints. Let P
0
, P
1
, . . . , P
d
be
its control points. Bezier curve has polar form that satises
M(0
nk
1
k
) = P
k
for k = 0, 1, 2, . . . , d. In fact, the de Casteljau algorithm can be viewed as a procedure for computing
P(t) = M(t, t, . . . , t). Below we elaborate on this relationship for cubic B-splines. Same argument works
for Bezier curves of all other degrees.
In the case of cubic B-splines, the polar form is dened by
M(0, 0, 0) = P
0
M(0, 0, 1) = P
1
M(0, 1, 1) = P
2
M(1, 1, 1) = P
3
. (2)
We want to compute P(t) = M(t, t, t). Here is a way to do it. We use the constraints on M to compute
M(0, 0, t), M(0, 1, t), M(1, 1, t):
M(0, 0, t) = M(0, 0, t 1 + (1 t) 0) = tM(0, 0, 1) + (1 t)M(0, 0, 0) =
= tP
1
+ (1 t)P
0
(= P
01
)
M(0, 1, t) = M(0, t, 1) = M(0, t 1 + (1 t) 0, 1) = tM(0, 1, 1) + (1 t)M(0, 0, 1) =
= tP
2
+ (1 t)P
1
(= P
12
)
M(1, 1, t) = M(t, 1, 1) = M(t 1 + (1 t) 0, 1, 1) = tM(1, 1, 1) + (1 t)M(0, 1, 1) =
= tP
3
+ (1 t)P
2
(= P
23
).
5
Points with multiple subscripts are the same as in the de Casteljau algorithm run for parameter t. Using
the above we compute M(0, t, t) and M(1, t, t):
M(0, t, t) = M(0, t 1 + (1 t) 0, t) = tM(0, 1, t) + (1 t)M(0, 0, t) =
= tP
12
+ (1 t)P
01
(= P
012
)
M(1, t, t) = M(1, t 1 + (1 t) 0, t) = tM(1, 1, t) + (1 t)M(1, 0, t) =
= tP
23
+ (1 t)P
12
(= P
123
).
Finally, we are done:
P(t) = M(t, t, t) = M(t 1 + (1 t) 0, t, t) = tM(1, t, t) + (1 t)M(0, t, t) =
= tP
123
+ (1 t)P
012
(= P
0123
).
This can be considered an algebraic interpretation of the de Casteljau algorithm: its actually equivalent
to computing a point on the Bezier curve from a polar representation constrained by Equations 2.
6

You might also like