//Logo Image
**Last updated: Yeh-Liang Hsu (2010-10-12).**

**Note: This is the course material for “ME550 Geometric modeling and
computer graphics,” Yuan Ze University. Part of this material is adapted from ***CAD/CAM
Theory and Practice*, by Ibrahim Zeid, McGraw-Hill, 1991. This material is
be used strictly for teaching and learning of this course.

# Bezier curves

## 1.
Defining a Bezier curve

**◇****Assignment 1**

## 2.
Parametric equations of the
Bezier curve

**◇****Assignment 2**

**◇****Assignment 3**

## 3.
Properties of the Bezier curves

**◇****Assignment 4**

**◇****Assignment 5**

**◇****Assignment 6**

Bezier curve was
developed by the French engineer Pierre Bezier (1910-1999) in 1962 for use in
the design of Renault automobile bodies. Pierre Bezier then went on to develop
the UNISURF CAD/CAM system. As shown in Figure 1, **the Bezier curve is defined in terms of the locations of n+1
points**. These points are called data or control points. They form the
vertices of what is called the

Figure 2 shows
cubic Bezier curves for various control points. In a Bezier curve, **only the first and the last control
points or vertices of the polygon actually lie on the curve. The curve is also
always tangent to the first and last polygon segments. In addition, the curve
shape tends to follow the polygon shape**. These three observations should
enable the user to sketch or predict the curve shape once its control points
are given.

**A closed Bezier curve** can
simply be generated by closing its characteristic polygon or choosing **P _{0}**
and

Figure 1. Cubic Bezier curve

Figure 2. Cubic Bezier curves for various control points.

Construct Bezier curves similar to those in Figure 2
using your CAD software. Describe the procedure for constructing these curves. ◇

In general, a
Bezier curve section can be fitted to any number of control points. **The number of control points to be
approximated determines the degree of the Bezier curve**. For *n*+1
control points, the Bezier curve is defined by the following polynomial of
degree *n*:

_{} _{} (1)

where _{} is any point on
the curve and _{} is a control
point, _{} are the **Bernstein polynomials**. **The Bernstein polynomial serves as the blending or basis
function for the Bezier curve** and is given by

_{} (2)

where _{} is the binomial
coefficient

_{} (3)

Equation (1) can be expanded to give

_{} (4)

From Equation (2) and (3), we can get the followings:

* n
*= 0, _{}

* n
*= 1, _{}

_{}

*n *= 2, _{}

_{}

_{}

*n *= 3, _{}

_{}

_{}

_{}

Therefore for *n* = 3,

_{}. (5)

Derive Bezier curve equations similar to Equation (5) for
*n* = 0, 1, 2. Explain what happens when *n* = 0, 1. Derive Bernstein
polynomials for *n* = 4, and construct the corresponding Bezier curve
equation. ◇

Assume the coordinates of 4 control points, write a
Matlab program to draw the corresponding control polygon. Use _{} to generate the
intermediate points of the Bezier curve using Equation (5). Use straight lines
to connect these points to generate the curve. Using proper transformation,
create the front, top, side, and isometric views of the 3-dimensional curve and
its control polygon. Show your Matlab program too. ◇

From the discussion above, we can see that the major differences between the Bezier curve and the cubic spline curve are:

(1) The shape of Bezier curve is controlled by its defining points only. First derivatives are not used in the curve development as in the case of the cubic spline. This allows the designer a much better feel for the relationship between input (points) and output (curve).

(2) The order or the degree of Bezier curve is variable and is related
to the number of points defining it; *n*+1 points defined and *n*th
degree curve which permits higher-order continuity. This is not the case for
cubic splines where the degree is always cubic for a spline segment.

(3) The Bezier curve is smoother than the cubic spline because it has higher-order derivatives.

A very useful
property of a Bezier is that **it always passes through the first and last control points**. If we substitute *u* = 0 and

_{} (6)

**The curve is tangent to the first and last segments of the
characteristic polygo**n. From Equation (5), the first derivatives when there are 4 control
points (*n* = 3) is given by

_{} (7)

Therefore the tangent vectors at the starting and ending points are

_{} (8)

_{} (9)

Similarly, it
can be shown that the second derivative at _{} is determined by _{}, _{}, and _{}; or, in general, the *r*-th derivative at an endpoint
is determined by its *r* neighboring vertices.

Prove from
Equation (4) that in general, the first derivatives at the starting and ending
points are given by Equation (10) and (11), respectively:

_{} (10)

_{} (11)

where _{} and _{} define the first
and last segments of the curve polygon. ◇

Another useful
property of the Bezier curve is that **the curve is symmetric with respect to u and (1-u)**. This means that the sequence of control points defining the curve
can be reversed without change of the curve shape; that is,

The
interpolation polynomial _{} has a maximum
value of _{} _{}occurring at _{} which can be
obtained from the equation _{} **This implies that each control point
is most influential on the curve shape at u = i / n.** For example, for a cubic Bezier curve,

Derive the maximum values of these 4 functions _{}, _{}, _{}, and _{}, and the values of *u* at the maximum. Plot these 4
functions and check whether your derivation is correct. ◇

The curve shape
can be modified by either changing one or more vertices of its polygon or by
keeping the polygon fixed and specifying multiple coincident points at a
vertex, as shown in Figure 3. In Figure 3(a), the vertex _{} is pulled to the
new position _{}. In Figure 3(b), _{} is assigned a
multiplicity *k*, that is, 2 or 3 control points are placed on the same
position. The higher the multiplicity, the more the curve is pulled toward _{}

Figure 3. Modifications of cubic Bezier curve.

Use your CAD software to generate figures similar to
Figure 3. ◇

Another important property of any Bezier curve is that **it lies within the convex polygon
boundary of the control points. This is called the “convex hull property.”** This follows from the properties of Bezier blending function: they
are all positive and for any valid value of *u* the sum of the _{} functions is
always equal to 1 for any degree of Bezier curve. Any curve position is simply
a weighted sum of the control point positions.

If the polygon defining a curve segment degenerates to a straight line, the resulting segment must therefore be linear. Also, the size of the convex hull is an upper bound on the size of the curve itself; that is, the curve always lies inside its convex hull. This is a useful property for graphics functions such as displaying or clipping the curve.

A Bezier curve still has some disadvantages. First, the curve does
not pass through the control points, which may be inconvenient to some designers.
Second, **the curve
lacks local control**. It only has the global control
nature. If one control point is changed, the whole curve changes. **The degree of the Bezier curve
depends on the number of control points.** Only 4
control points are needed for a cubic Bezier Curve. **High order curves may result if there are many control
points.**

When curves of
many control points are to be generated, **they can be formed by piecing several Bezier sections of
lower degree together**. Piecing together smaller sections also gives us better control over
the shape of the curve in small regions. Since Bezier curves passes through
endpoints, it is easy to match curve sections with _{} continuity. Also,
Bezier curve have the important property that it tangents to the control
polygon at the end points. Therefore we can obtain _{} continuity by
making the two lines joining the endpoint to the adjacent control points
collinear.