Given n+1 points P0, P1, P2, ... and Pn in space, the control points, the Bézier curve defined by these control points is
where the coefficients are defined as follows:
Therefore, the point that corresponds to u on the Bézier curve is the "weighted" average of all control points, where the weights are the coefficients Bn,i(u). The line segments P0P1, P1P2, ..., Pn-1Pn, called legs, joining in this order form a control polyline. Many authors prefer to call this control polyline as control polygon. Functions Bn,i(u), 0 <= i <= n, are referred to as the Bézier basis functions or Bernstein polynomials.
Note that the domain of u is [0,1]. As a result, all basis functions are non-negative. In the above, since u and i can both be zero and so do 1 - u and n - i, we adopt the convention that 00 is 1. The following shows a Bézier curve defined by 11 control points, where the blue dot is a point on the curve that corresponds to u=0.4. As you can see in the figure, the curve more or less follows the polyline.
The following properties of a Bézier curve are important:
In the left figure above, we have a Bézier curve defined by five control points. Its five basis functions are functions in u as shown in the right figure above. The figures show u=0.5 and all five basis functions. The right-most vertical bar shows the way of partitioning 1 into five intervals and hence the name of partition of unity. Note that the color of a partition is identical to the color used to draw its corresponding basis functions.
Since all basis functions are in the range of 0 an 1 and sum to one, they can be considered as weights in the computation of a weighted average. More precisely, we could say "to compute C(u), one takes the weight Bn,i(u) for control point Pi and sum them together."
This property is important because we are guaranteed that the generated curve will be in an understood and computable region and will not go outside of it.
Take a look at the above figure. The yellow line intersects the curve 3 times and the polyline 7 times; the magenta line intersects the curve 5 times and the polyline 7 times; and the cyan line intersects the curve and its polyline twice. You could draw other straight lines to verify this property.
If the curve is a space curve, replacing "line" with "plane" will suffice. Special cases may occur; however, it will not be a difficult task to come up with a proper counting scheme that takes these special cases into consideration.
So, what is the meaning of this property? It tells us that the complexity (i.e., turning and twisting) of the curve is no more complex than the control polyline. In other words, the control polyline twists and turns more frequently than the Bézier curve does, because an arbitrary line hits the control polyline more often than it hits the curve. Take a look at the above figure,the control polyline is more complex than the curve it defines.
Sometimes the domain of a Bézier curve is [a,b] rather than [0,1]. Thus, a change of variable is required. What we should do is simply converting a u in [a,b] to a new u in [0,1] and using this u in the basis functions. Converting u to [0,1] can be done as follows:
Plugging this u into the basis function Bn,i(u) gives the following:
These new basis functions define a Bézier curve on the domain of [a,b]. We shall use this fact in later sections.
In summary, to define a Bézier curve of degree n, we need to choose n + 1 control points in space so that they roughly indicate the shape of the desired curve. Then, if it is not up to our expectation, we can move the control points around. As one or more control points are moved, the shape of the Bézier curve changes accordingly. But, the curve always lies in the convex hull defined by the control points (the convex hull property), and the shape of generated curve is less complex than the control polyline (variation diminishing property).