CAGD-banner.gif
On-Line Geometric Modeling Notes
QUADRATIC BÉZIER CURVES


Overview

The Bézier curve representation is one that is utilized most frequently in computer graphics and geometric modeling. The curve is defined geometrically, which means that the parameters have geometric meaning - they are just points in three-dimensional space. It was developed by two competing European engineers in the late 1960s to attempt to draw automotive components.

In these notes, we develop the quadratic Bézier curve. This curve can be developed through a divide-and-conquer approach whose basic operation is the generation of midpoints on the curve. However, this time we develop the curve by calculating points other than midpoints - resulting in a useful parameterization for the curve.

pdficonsmall.gif To get a pdf version of these notes look here.


Development of the Quadratic Bézier Curve

Given three control points $ {\bf P} _0,$ $ {\bf P} _1$ and $ {\bf P} _2$ we develop a divide procedure that is based upon a parameter $ t$, which is a number between 0 and $ 1$ (the illustrations utilize the value $ t=.75$). This proceeds as follows:

This is a similar procedure to the divide-and-conquer method in that geometric means are used to define points on the curve. Each time a new point is calculated, the control points are subdivided into two sets, each of which may be use to generate new subcurves. The method is identical to the divide-and-conquer method in the case $ t=\frac{1}{2}$.


Developing the Equation of the Curve

There is a different way of looking at this procedure - because there is a parameter involved. Each one of the points $ {\bf P} _1 ^{(1)}$, $ {\bf P} _2 ^{(1)}$, and $ {\bf P} _2 ^{(2)}$ is really a function of the parameter $ t$ - and $ {\bf P} _2 ^{(2)}$ can be equated with $ {\bf P} (t)$ since it is a point on the curve that corresponds to the parameter value $ t$. In this way, $ {\bf P} (t)$ becomes a functional representation of the Bézier curve.

Writing down the algebra, we see that

\begin{displaymath}\begin{aligned}{\bf P} (t) & = {\bf P} _2 ^{(2)}(t) \\  & = (1-t) {\bf P} _1 ^{(1)}(t) + t {\bf P} _2 ^{(1)}(t) \end{aligned}\end{displaymath}

where

\begin{displaymath}\begin{aligned}{\bf P} _1 ^{(1)}(t) & = (1-t) {\bf P} _0 + t ...
... _2 ^{(1)}(t) & = (1-t) {\bf P} _1 + t {\bf P} _2 \end{aligned}\end{displaymath}

(Note that we have now denoted $ {\bf P} _1 ^{(1)}$ and $ {\bf P} _2 ^{(1)}$ as functions of $ t$.) Substituting these two equations back into the original, we have

\begin{displaymath}\begin{aligned}{\bf P} (t) & = (1-t) {\bf P} _1 ^{(1)}(t) + t...
... {\bf P} _0 + 2t(1-t) {\bf P} _1 + t^2 {\bf P} _2 \end{aligned}\end{displaymath}

This is quadratic polynomial (as it is a linear combination of quadratic polynomials), and therefore it is a parabolic segment. Thus, the quadratic Bézier curve is simply a parabolic curve.


Properties of the Quadratic Curve

The quadratic Bézier curve has the following properties, which can be easily verified.

1.
$ {\bf P} (0) = {\bf P} _0$ and $ {\bf P} (1) = {\bf P} _2$, so the curve passes through the control points $ {\bf P} _0$ and $ {\bf P} _2$.
2.
The curve $ {\bf P} (t)$ is continuous and has continuous derivatives of all orders. (This is automatic for a polynomial.)
3.
We can differentiate $ {\bf P} (t)$ with respect to $ t$ and obtain

\begin{displaymath}\begin{aligned}\frac{d}{dt} {\bf P} (t) & = -2(1-t) {\bf P} _...
... t \left( {\bf P} _2 - {\bf P} _1 \right) \right] \end{aligned}\end{displaymath}

Thus $ \frac{d}{dt} {\bf P} (0) = 2 ( {\bf P} _1 - {\bf P} _0 )$, is the tangent vector at $ t=0$ and $ \frac{d}{dt} {\bf P} (1) = 2 ( {\bf P} _2 - {\bf P} _1)$ is the tangent vector at $ t=1$. This implies that the slope of the curve at $ t=0$ is the same as that of the vector $ 2 ( {\bf P} _1 - {\bf P} _0 )$ and the slope of the curve at $ t=1$ is the same as that of the vector $ 2 ( {\bf P} _2 - {\bf P} _1 )$.

4.
The functions $ (1-t)^2$, $ 2t(1-t)$, and $ t^2$ that are used to ``blend'' the control points $ {\bf P} _0$, $ {\bf P} _1$ and $ {\bf P} _2$ together are the degree-2 Bernstein Polynomials They are all non-negative functions and sum to one. Clearly

$\displaystyle (1-t)^2 + 2t(1-t) + t^2 \: = \: 1 - 2t + t^2 + 2t - 2t^2 + t^2 \: = \: 1
$

5.
The curve is contained within the triangle $ \triangle {\bf P} _0 {\bf P} _1 {\bf P} _2$.

Since the blending functions are non-negative and add to one, $ P(t)$ is an affine combination of the points $ {\bf P} _0$, $ {\bf P} _1$, and $ {\bf P} _2$. Thus $ {\bf P} (t)$ must lie in the convex hull of the control points for all $ 0 \leq t \leq 1$. The convex hull of a triangle is the triangle itself.

6.
If the points $ {\bf P} _0$, $ {\bf P} _1$ and $ {\bf P} _2$ are colinear, then the curve is a straight line.

If the points are colinear, then the convex hull is a straight line, and the curve must lie within the convex hull.

7.
The process of calculating one $ {\bf P} (t)$ subdivides the control points into two sets $ \left\{ {\bf P} _0, {\bf P} _1^{(1)}(t), {\bf P} _2^{(2)}(t) \right\}$, and $ \left\{ {\bf P} _2^{(2)}(t), {\bf P} _2^{(1)}(t), {\bf P} _2 \right\}$, each of which can be used to define another curve, as in our subdivision process above.

8.
All the points, generated from the divide-and-conquer method, lie on this curve.

Clearly $ {\bf P} (\frac{1}{2})$ is the first point calculated by the divide and conquer method.

Lets show that $ {\bf P} (\frac{1}{4})$ is exactly the point obtained by performing the divide-and-conquer method, on the control points $ {\bf Q} _0 = {\bf P} _0$, $ {\bf Q} _2 = {\bf P} _1^{(1)}(\frac{1}{2})$ and $ {\bf Q} _2 = {\bf P} _2^{(2)}(\frac{1}{2})$ which were generated in the first step of the divide-and-conquer method. If we call this point $ {\bf Q} $, then by the divide-and-conquer method

\begin{displaymath}\begin{aligned}{\bf Q} & = \frac{1}{2} {\bf Q} _1^{(1)} + \fr...
...rac{1}{2} {\bf Q} _1 + \frac{1}{4} {\bf Q} _2 \\  \end{aligned}\end{displaymath}

and by substituting for the $ {\bf Q} $s, and similifying

\begin{displaymath}\begin{aligned}{\bf Q} & = \frac{1}{4} {\bf P} _0 + \frac{1}{...
... \frac{3}{8} {\bf P} _1 + \frac{1}{16} {\bf P} _2 \end{aligned}\end{displaymath}

If we calculate $ {\bf P} (t)$ with $ t = \frac{1}{4}$, we have

\begin{displaymath}\begin{aligned}{\bf P} (\frac{1}{4}) & = (1-t)^2 {\bf P} _0 +...
... \frac{3}{8} {\bf P} _1 + \frac{1}{16} {\bf P} _2 \end{aligned}\end{displaymath}

So $ {\bf P} (\frac{1}{4}$ is exactly the point constructed in from the divide-and-conquer algorithm. Similar calculations exist for all other points generated in the divide and conquer method - each point generated by the method will correspond to one with a corresponding parameter of $ \frac{k}{2^n}$ for some $ k$ and $ n$.


Summarizing the Development of the Curve

We now have two methods by which we can generate points on the curve. The first of which is geometrically based - points are found on the curve by selecting successive points on line segments. The other is an analytic formula, which expresses the curve in functional notation.


Summary

The quadratic curve serves as a good example for discussing the development of the Bézier curve, but really only generates parabolas. This eliminates the curve for many applications where smooth curves with inflection points are necessary. The problem can be addressed by performing exactly the same steps as above, but utilizing the procedure on four control points - resulting in the cubic Bézier curve.


\begin{singlespace}
\noindent
\footnotesize\bfseries All contents copyright (c) ...
...ment, University of California, Davis \\
All rights reserved.
\end{singlespace}


Ken Joy
2000-11-28