Bézier curves can be defined for any degree
n.
Recursive definition A
recursive definition for the Bézier curve of degree
n expresses it as a point-to-point
linear combination (
linear interpolation) of a pair of corresponding points in two Bézier curves of degree
n − 1. Let \mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_k} denote the Bézier curve determined by any selection of points
P0,
P1, ...,
Pk. Then to start, :\mathbf{B}_{\mathbf{P}_0}(t) = \mathbf{P}_0 \text{, and} :\mathbf{B}(t) = \mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_n}(t) = (1-t)\mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_{n-1}}(t) + t\mathbf{B}_{\mathbf{P}_1\mathbf{P}_2\ldots\mathbf{P}_n}(t) This recursion is elucidated in the
animations below.
Explicit definition The formula can be expressed explicitly as follows (where t0 and (1-t)0 are extended continuously to be 1 throughout [0,1]): :\begin{align} \mathbf{B}(t) &= \sum_{i=0}^n {n\choose i}(1 - t)^{n - i}t^i\mathbf{P}_i \\ &=(1 - t)^n\mathbf{P}_0 + {n\choose 1}(1 - t)^{n - 1}t\mathbf{P}_1 + \cdots + {n\choose n - 1}(1 - t)t^{n - 1}\mathbf{P}_{n - 1} + t^n\mathbf{P}_n, && 0 \leqslant t \leqslant 1 \end{align} where \scriptstyle {n \choose i} are the
binomial coefficients. For example, when
n = 5: :\begin{align} \mathbf{B}(t) &= (1 - t)^5\mathbf{P}_0 + 5t(1 - t)^4\mathbf{P}_1 + 10t^2(1 - t)^3 \mathbf{P}_2 + 10t^3 (1-t)^2 \mathbf{P}_3 + 5t^4(1-t) \mathbf{P}_4 + t^5 \mathbf{P}_5, && 0 \leqslant t \leqslant 1. \end{align}
Terminology Some terminology is associated with these parametric curves. We have :\mathbf{B}(t) = \sum_{i=0}^n b_{i, n}(t)\mathbf{P}_i,\ \ \ 0 \le t \le 1 where the polynomials :b_{i,n}(t) = {n \choose i} t^i (1 - t)^{n - i},\ \ \ i = 0, \ldots, n are known as
Bernstein basis polynomials of degree
n.
t0 = 1, (1 −
t)0 = 1, and the
binomial coefficient, \scriptstyle {n \choose i}, is: :{n \choose i} = \frac{n!}{i!(n - i)!}. The points
Pi are called
control points for the Bézier curve. The
polygon formed by connecting the Bézier points with
lines, starting with
P0 and finishing with
Pn, is called the
Bézier polygon (or
control polygon). The
convex hull of the Bézier polygon contains the Bézier curve.
Polynomial form Sometimes it is desirable to express the Bézier curve as a
polynomial instead of a sum of less straightforward
Bernstein polynomials. Application of the
binomial theorem to the definition of the curve followed by some rearrangement will yield :\mathbf{B}(t) = \sum_{j = 0}^n {t^j \mathbf{C}_j} where :\mathbf{C}_j = \frac{n!}{(n - j)!} \sum_{i = 0}^j \frac{(-1)^{i + j} \mathbf{P}_i}{i! (j - i)!} = \prod_{m = 0}^{j - 1} (n - m) \sum_{i = 0}^j \frac{(-1)^{i + j} \mathbf{P}_i}{i! (j - i)!}. This could be practical if \mathbf{C}_j can be computed prior to many evaluations of \mathbf{B}(t); however one should use caution as high order curves may lack
numeric stability (
de Casteljau's algorithm should be used if this occurs). Note that the
empty product is 1.
Properties • The curve begins at \mathbf P_0 and ends at \mathbf P_n; this is the so-called
endpoint interpolation property. • The curve is a line
if and only if all the control points are
collinear. • The start and end of the curve is
tangent to the first and last section of the Bézier polygon, respectively. • A curve can be split at any point into two subcurves, or into arbitrarily many subcurves, each of which is also a Bézier curve. • Some curves that seem simple, such as the
circle, cannot be described exactly by a Bézier or
piecewise Bézier curve; though a four-piece cubic Bézier curve can approximate a circle (see
composite Bézier curve), with a maximum radial error of less than one part in a thousand, when each inner control point (or offline point) is the distance \textstyle\frac{4\left(\sqrt {2}-1\right)}{3} horizontally or vertically from an outer control point on a
unit circle. More generally, an
n-piece cubic Bézier curve can approximate a circle, when each inner control point is the distance \textstyle\frac{4}{3}\tan(t/4) from an outer control point on a unit circle, where t = 2\pi/n (i.e. t=360^\circ/n), and n>2. • Every quadratic Bézier curve is also a cubic Bézier curve, and more generally, every degree
n Bézier curve is also a degree
m curve for any
m >
n. In detail, a degree
n curve with control points \mathbf{P}_0,\,\dots,\,\mathbf{P}_n is equivalent (including the parametrization) to the degree
n + 1 curve with control points \mathbf{P}'_0,\,\dots,\,\mathbf {P}'_{n+1}, where \mathbf P'_k=\tfrac{k}{n+1}\mathbf P_{k-1}+\left(1-\tfrac{k}{n+1}\right)\mathbf P_k, \forall k = 0,\,1,\,\dots,\,n,\,n+1 and define \mathbf{P}_{n+1} := \mathbf{P}_{0}, \mathbf{P}_{-1} := \mathbf{P}_{n}. • Bézier curves have the
variation diminishing property. What this means in intuitive terms is that a Bézier curve does not "undulate" more than the polygon of its control points, and may actually "undulate" less than that. • There is no
local control in degree
n Bézier curves—meaning that any change to a control point requires recalculation of and thus affects the aspect of the entire curve, "although the further that one is from the control point that was changed, the smaller is the change in the curve". • A Bézier curve of order higher than two may intersect itself or have a
cusp for certain choices of the control points.
Second-order curve is a parabolic segment A quadratic Bézier curve is also a segment of a
parabola. As a parabola is a
conic section, some sources refer to quadratic Béziers as "conic arcs". • Tangents to the parabola at the endpoints of the curve (A and B) intersect at its control point (C). • If D is the midpoint of AB, the tangent to the curve which is
perpendicular to CD (dashed cyan line) defines its vertex (V). Its axis of symmetry (dash-dot cyan) passes through V and is perpendicular to the tangent. • E is either point on the curve with a tangent at 45° to CD (dashed green). If G is the intersection of this tangent and the axis, the line passing through G and perpendicular to CD is the directrix (solid green). • The focus (F) is at the intersection of the axis and a line passing through E and perpendicular to CD (dotted yellow). The latus rectum is the line segment within the curve (solid yellow).
Derivative The derivative for a curve of order
n is :\mathbf{B}'(t) = n \sum_{i=0}^{n-1} b_{i,n-1}(t) (\mathbf{P}_{i+1} - \mathbf{P}_i). ==Constructing Bézier curves==