Académique Documents
Professionnel Documents
Culture Documents
Convex Hulls
i 0
ai= 1 , ai 0}
(1)
The definition of the convex hull is valid for points in space. The intuitive
elastic band is replaced by an elastic balloon which is permitted to shrink
around the points to form a polyhedron. The convex hull is the region
bounded by the polyhedron. Several examples of convex hulls are
illustrated in Fig. 1.
Theorem 2
A Bzier curve B(t) of degree n with control points b0, ..., bn satisfies the
following properties.
Thus every point of a Bezier curve lies inside the convex hull of its
defining control points. The convex hull of the control points is often
referred to as the convex hull of the Bezier curve.
T( biBi,n(t)) =
i 0
i 0
T(bi )Bi,n(t)
For a planar Bzier B(t) curve the VDP states that the number of
intersections of a given line with B(t) is less than or equal to the number of
intersections of that line with the control polygon.
Proof
curve has the form a0b0 +... +anbn for some constants ai satisfying
i 0
ai =
implies that
i 0
Figure 2. Illustration of the convex hull property for a cubic Bezior curve
and let a Bezier curve of degree n have control points bi(pi, qi) for i =
0, ... ,n. Then
n
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
i 0
Example 7
i 0
T(bi) Bi,n(t)
Consider a cubic Bzier curve with vertices b0(1, 0), b1(2, 3), b2(5, 4), and
b3(2, 1). To apply a rotation through an angle /4 about the origin in the
anticlockwise direction to the curve, it is sufficient to apply the rotation
matrix Rot(/4) to the homogeneous coordinates of the control points.
101
231
541
211
. . .
cos / 4 sin / 40 0707070710
. . .
sin / 4 cos / 40 0707353610
. . .
001
0707212110
Figure 4 illustrates two lines intersecting a Bzier curve and its control
polygon. The upper line intersects the polygon in two points but does not
intersect the curve. The lower line intersects both the polygon and the
curve in two points. In both cases, the number of intersections with the
given line is equal to or greater than the number of intersections of the line
with the curve. Thus the variation diminishing property is satisfied. The
proof of the variation diminishing property can be found in [1].
Exercises
22. Plot the cubic Bezier curve defined by control points b0(0, 1), b1(2. 5),
b2(4, 6), and b3(8, 1). On the same plot, draw the control polygon.
Observe that the resulting curve satisfies the convex hull property. Next
plot the Bezier cubic with control points b0(1, 1), b1(3.4, 1.8), b2(6, 6.5),
and b3(9,1). Does the newly displayed curve violate the convex hull
property? Explain.
23. Prove the endpoint interpolation property for the general Bezier curve:
B(0) = b0 and B(1) = bn.
24. Prove that when the control points are collinear, the resulting Bezier
curve is a straight line segment.
25. Determine the control points of the image of the Bezier curve with
control points b0(0, 0), b1(2,1), b2(3, -1), and b3(1, -2) when the following
transformations have been applied
(a) a translation of 3 units in the x-direction and 4 units in the y-direction,
(b) a rotation about the origin through an angle of /2 radians in an anticlockwise direction,
(c) a reflection in the line y = x.
For each transformation plot the image curve and its control polygon.
case of a cubic Bzier curve with control points b0, b1, b2, and b3, and for
a specified parameter value t [0, 1], the de Casteljau algorithm is
expressed by the recursive formula
b0i = bi ,
(2)
b20 b21
b30
Example 8
A cubic Bezier curve has control points b0(1.0, 1.0), b1(2.0, 7.0), b2(8.0,
6.0), and b3(12.0, 2.0). The point B(0.25) is determined by applying the de
Casteljau algorithm with t = 0.25. Then
b10 = 3/4(1.0,1.0) + 1/4(2.0,7.0) = (1.25,2.5),
b11 = 3/4(2.0,7.0) + 1/4(8.0,6.0) = (3.5,6.75),
b12 = 3/4(8.0,6.0) + 1/4(12.0,2.0) = (9.0,5.0),
b20 = 3/4(1.25,2.5) + 1/4(3.5,6.75) = (1.8125,3.5625), etc.
(2.0,7.0)
(8.0,6.0)
3/41/4 3/41/4
(1.25.2.5) (3.5.6.75)
3/41/4
(1.8125, 3.3625)
(12.0,2.0)
3/41/4
(9.0,5.0)
3/41/4
(4.875,6.3125)
3/41/4
(2.578,4.25)
Theorem 3
Let a Bezier curve of degree n be given by control points b0, ... , bn, and let
t [0,1] be any parameter value. Then B(t) = bn0, where b0i = bi and
B(t) =
i 0
biBi,n(t) =
i 0
i 0
bi(1- t) Bi,n-1(t) +
i 0
bi t Bi-1,n-1(t))
n 1
i 0
bi(1- t) Bi,n-1(t) +
i 1
bi t Bi-1,n-1(t).
n 1
i 0
bi(1- t) Bi,n-1(t) +
n 1
i 1
bi t Bi-1,n-1(t)
n 1
i 0
Set b1i = bi(1- t) + bi+1 t) = boi(1- t) + boi+1 t) for i = 0, ... , n-1, then
B(t) =
n 1
i 0
b1iBi,n-1(t)
(3)
n 2
i 0
b2iBi,n-2(t)
n j
i 0
bjiBi,n-j(t)
B(t) =
i 0
bniBi,n-n(t) = bn0.
Exercises
26. A cubic Bezier curve has control points b0(1, 0), b1(3, 3), b2(5, 5),
and b3(7, 2). Evaluate the point B(0.25) by (a) applying the de Casteljau
algorithm, and (b) substituting t = 0.25 into the defining equation of the
Bzier curve. Make a sketch illustrating the points derived in applying de
Casteljau algorithm.
27. Apply the do Casteljau algorithm to the quadric Bezier curve with
control points b0(3.0,3.0). b1(4.0, 2.0), b2(-1.0, 0.0), b3(6.0, 1.0). and
b4(8.0, 5.0). and evaluate the point B(0.6).
A Bzier curve is generally defined over the interval [0,1] and given by
B(t) =
i 0
Figure 6.
Since Bleft(t) and Bright(t) are polynomial curves they can be represented in
Bezier form over the interval [0,1]. Theorem 4 will show that to determine
the control points of Bleft(t) and Bright(t) it is sufficient to apply the de
Example 9
A Bzier cubic B(t) has control points b0(l.0,1.0), b1(2.0,7.0), b2(8.0. 6.0),
and b3(12.0. 2.0). The control points of the two curve segments Bleft(t) and
Bright(t), obtained by cutting B(t) at the parameter value t = 0.25, are
determined from the triangle of points computed in Example 8. Bleft(t) has
control b0(l.0,1.0), b1(1.25,2.5), b2(1.8125, 3.5625), b3(2.578, 4.25),
points and Bright(t) has control points b0(2.578, 4.25), b1(4.875, 6.3125),
b2(9.0, 5.0), b3(12.0, 2.0).
0
Theorem 4 (Subdivision)
i 0
Exercises
30 A cubic Bezier curve B(t) is given by the four control points b0(0.2,
0.0), b1(1.0, 0.4), b2(1.8, 1.2), and b3(3.4, 0.0).
(a) Use the de Casteljau algorithm to evaluate the point B(0.25).
(b) Use the triangular array of points evaluated in part (a) to write down
the sets of control points defining the segments Bleft and Bright, which are
obtained when B(t) is subdivided at t = 0.25.
Applications
1. Rendering
To render a curve means to obtain a plot of it. The main step of the
rendering algorithm is an application of the de Casteljau algorithm to
subdivide the curve.
Step 1: Apply the de Casteljau algorithm with t = 1/2 to subdivide the
Bezier curve into two curve segments denoted Bleft and Bright
Step 2: If Bleft is near linear' (using the criterion described below) then go
to step 3; else, go to step 1 and apply the algorithm to Bleft. Similarly, if
Bright is near linear go to step 3; else go to step 1 and apply the algorithm to
Bright.
Step 3: The segment is near linear and can be approximated by its control
polygon. Draw the control polygon.
Each time step 3 is executed, the control polygon of a segment of the curve
is drawn. The union of all these control polygons gives a linear
approximation of the original Bezier curve.
but generally it will result in fewer subdivisions which will give a saving in
computations.
Figure 7.
A planar Bzier curve B(t) of degree n can intersect a line in the plane in
up to n points. (It is assumed that B(t) is not a line segment and
Step 1: Test whether the convex hull of the control points intersects the
line (see below for details). If so, go to step 2 as there may be an
intersection; else the curve does not intersect the line and the curve may be
disregarded.
Step 2: Test to see if the curve is near linear. If so, go to step 3; else, apply
the de Castehjau algorithm to subdivide the curve into two Bezier curve
segments and repeat step 1 with each segment.
Step 3: The curve (or curve segment) is linear and may be approximated
by a line segment (for example, by the line joining the first and last control
points), and intersected with using the algorithm, implementing the
line/Besier intersection, and Bezier.Bezier intersection algorithms. The
intersection is a point of intersection of the Bzier curve and .
Step 1: Test to see if the convex hulls of the control polygons intersect (see
below for details). If so, go to step 2 as the curves may intersect; else the
curves cannot intersect and may be disregarded.
Step 2: Test whether the curves are linear. If so, go to step 3; else, apply
the de Casteljau algorithm to subdivide each curve into two segments, and
to give a total of four pairs of curve segments. Go to step 1 and apply the
algorithm to each pair.
Step 3: Since both curves are near linear, the curves may be approximated
by line segments (for example, by the line joining the first and last control
points). The two linear segments are intersected (using the line/Besier
intersection, and Bezier.Bezier intersection algorithms) to determine the
point of intersection of the two segments.
Exercises
i 0
References
[1] I. Shoenberg, Contribution to The Problem of Approximation of equidistant data by
Analytic functions, Quart. Appl. Math. , Vol. 4, 1946, 45-99
[2] A. Watt and M. Watt, Advanced Animation and Rendering techniques, Theory and
Practice, Addison-Wesley, 1992, 455
[3] J.D. Foley, A. van Dam, S.K. Feiner, J.F. Hughes, T. L. Philips, Introduction to
Computer Graphics, Addison-Wesley publishing Company, 1986, 559
[4] D. Marsh, Applied Geometry for Computer Graphics and CAD, Springer, 1999
[5] M.E. Mortenson, Geometric Modeling, John Wiley &Sons, 1985