I am currently teaching Numerical Analysis and using Burden-Faires. The book covers the topics we like, but I feel that the section on splines and parametrized curves is a bit weak; in particular the discussion on Bézier curves is a bit lacking. The pity: the discussion need not be all that deep, and the standard equation for Bézier curves is actually easy to remember.
Also: where the text talks about how the Bézier curve equations differs from the “bare handed parametric cubic spline” that they derive, they don’t explain the reason for the difference.
So, I decided to write these notes. I will have to explain some basic concepts.
The setting: with the usual geometry induced by the usual “dot product”.
Convex Sets in
A set is said to be convex if for any two points , the straight line segment connecting to is also in ; that is, the set for all .
Convex Hull for a set of points
Now suppose one is given a collection of points . The convex hull for is the smallest convex set which contains all of . That is, if is any convex set that contains , then . In the case where the set of points is finite (say, then consists the set of all where and .
Note: the convex hull for a set of points is, in general, an example of a vector subset that is NOT a vector subspace.
Binomial Theorem and the Bernstein coefficient polynomials
Recall from algebra: if is a positive integer and numbers (real, complex, or even arbitrary field elements), , where . For example, .
Now consider the rather silly looking: Note that this expression is equal to 1 for ALL values of and that for , each summand is positive or zero.
These “coefficient polynomials” are called the Bernstein polynomials (or Bernstein basis polynomials) and we denote them as follows: . We now see that for all and
Definition of a Bézier curve and some of its properties
Now let be a collection of distinct points in . One can think of these points as vectors.
The Bézier curve with control points is defined to be .
. This is clear because and for .
The polygon formed by is called the control polygon for the Bézier curve.
For all is in the convex hull of . This is clear because and each is positive.
“Guideposts”: the text talks about the “guideposts”: the text looks at a cubic Bézier curve in the plane and uses
Now and directly affect the (one sided) tangent to the Bézier curve at . In fact we will show that if we use the one-sided parametric curve derivative, we see that . The text calls the scaling factor and notes that the scaling factor is 3 when .
We’ll do the calculations for for the general degree Bézier curve using elementary calculus (product rule):
First write . Now take the derivative and we see:
Key observation: every term of has both a factor of and in it; hence this middle term evaluates to zero when and is therefor irrelevant to the calculation of and .
So (the last two terms are zero at and (the first two terms are zero at ).
It follows that the DIRECTION of the (one sided) tangents at the ends of the Bézier curve depends only on the unit tangent vectors in the direction of respectively. Of course, the tangent vector has a magnitude (norm) as well, and that certainly affects the curve.
Here are some examples of Bézier cubic curves: the points with the open circles are and the points that are filled in with gray are the control points . The last curve is two Bézier cubics joined together.
The software that I provided writes the cubic Bézier curve as a “conventional” cubic in coordinates: and .