Bézier Curves: How Four Points Create Beautiful Shapes

How can four points create a smooth curve? Cubic Bézier curves appear in fonts, vector graphics, animation, and computer-aided design. Their geometry is controlled by just four points, yet they can bend, change concavity, and even cross themselves.

1. Four control points and one curve

Let P_0, P_1, P_2, and P_3 be points in the plane. For 0 ≤ t ≤ 1, define

B(t)=\left(1-t\right)^3P_0+3t\left(1-t\right)^2P_1+3t^2\left(1-t\right)P_2+t^3P_3

Operations on points are interpreted coordinatewise. The curve begins at P_0 and ends at P_3. The broken line P_0P_1P_2P_3 is the control polygon; the curve need not pass through its middle vertices.

A new numerical example

Choose P_0=(0,0), P_1=(2,5), P_2=(6,5), P_3=(8,0). Substitution and simplification give

x(t)=6t+6t^2-4t^3,\qquad y(t)=15t-15t^2

For example, at t=1/2, the point is B(1/2)=(4,15/4). The symmetry of the control points produces a symmetric arch.

P0P1P2P3
Figure 1. Our new example (blue) and its dashed control polygon. The middle control points guide the shape but are not on the curve.

2. Why the curve stays in the convex hull

The four scalar weights are (1−t)³, 3t(1−t)², 3t²(1−t), and t³. They are nonnegative for 0 ≤ t ≤ 1, and their sum is

\left(1-t\right)^3+3t\left(1-t\right)^2+3t^2\left(1-t\right)+t^3=(\left(1-t\right)+t)^3=1

Proof. By definition, a convex combination of points is a weighted sum with nonnegative weights totaling one. Every B(t) is such a combination of the four control points. Hence the entire curve lies in their convex hull—the smallest convex region containing them. This remains true even if the curve has a loop.

3. Endpoint tangents

Differentiate the defining polynomial and group the terms:

B'(t)=3\left(1-t\right)^2(P_1-P_0)+6t\left(1-t\right)(P_2-P_1)+3t^2(P_3-P_2)

Consequently,

B'(0)=3(P_1-P_0),\qquad B'(1)=3(P_3-P_2)

Thus, whenever the respective endpoint derivative is nonzero, the tangent line at the start follows P_0P_1, and the tangent line at the end follows P_2P_3. In our example these tangent vectors are (6,15) and (6,−15). Notice that these vectors specify tangent directions, not necessarily the direction of the entire control polygon.

4. De Casteljau’s algorithm: constructing the curve by interpolation

For a fixed t, interpolate successively between neighboring control points:

Q_i=\left(1-t\right)P_i+tP_{i+1},\qquad i=0,1,2
R_i=\left(1-t\right)Q_i+tQ_{i+1},\qquad i=0,1
B(t)=\left(1-t\right)R_0+tR_1

Why it works. Substitute the formulas for Q_0,Q_1,Q_2 into those for R_0,R_1, then into the last expression. Collecting the coefficients of P_0 through P_3 produces exactly the cubic Bézier formula in Section 1.

At t=1/2, the first interpolation points are Q_0=(1,5/2), Q_1=(4,5), Q_2=(7,5/2); the next points are R_0=(5/2,15/4), R_1=(11/2,15/4). Their midpoint is (4,15/4), as expected.

P0P1P2P3
Figure 2. De Casteljau construction at t=1/2: orange first-stage interpolation, green second-stage interpolation, and the final black point on the curve.

5. Can a cubic Bézier curve have a loop?

Yes. Here is an exact construction, deliberately different from the textbook example. Consider the parametric cubic

x(t)=\left(t-\frac12\right)^2,\qquad y(t)=\left(t-\frac12\right)\left(\left(t-\frac12\right)^2-\frac1{16}\right)

At t=1/4 and t=3/4, both expressions yield the same point (1/16,0). Since the parameters are distinct, the curve crosses itself. Its Bézier control points, obtained by converting the cubic power coefficients to Bernstein form, are

\begin{aligned}P_0&=\left(\frac14,-\frac3{32}\right),&P_1&=\left(-\frac1{12},\frac{13}{96}\right),\\P_2&=\left(-\frac1{12},-\frac{13}{96}\right),&P_3&=\left(\frac14,\frac3{32}\right).\end{aligned}
t=1/4 and 3/4
Figure 3. An exact cubic loop. The two parameter values 1/4 and 3/4 give the same crossing point.

6. Joining Bézier curves smoothly

Suppose one segment ends at P_3 and the next begins at Q_0. Three commonly used continuity conditions are:

C^0: P_3=Q_0, so the pieces meet. G^1: their nonzero tangent vectors point in the same direction, so the tangent line has no corner. C^1: their tangent vectors are equal (for the chosen parameterization), so the first derivative is continuous.

C^1:\quad P_3=Q_0,\qquad 3(P_3-P_2)=3(Q_1-Q_0)

For a concrete S-shaped construction, take the first control polygon (0,0),(1,2),(2,2),(3,0) and the second (3,0),(4,−2),(5,−2),(6,0). Both derivatives at the join equal (3,−6), so the pieces meet with C^1 continuity. Equal tangents are stronger than merely collinear tangents.

join
Figure 4. Two cubic segments form an S-shaped path and meet with matching derivatives at (3,0).

7. Curvature, inflection points, and a cubic limitation

For a regular parametric curve B(t)=(x(t),y(t)), meaning B′(t)≠0, the unsigned curvature is

\kappa(t)=\frac{|x\prime(t)y\prime\prime(t)-y\prime(t)x\prime\prime(t)|}{\left((x\prime(t))^2+(y\prime(t))^2\right)^{3/2}}

The numerator is the signed turning determinant. For cubic coordinate polynomials, x′ and y′ are quadratic while x″ and y″ are linear. Although the products appear cubic, their cubic terms cancel, leaving a polynomial of degree at most two. Therefore a nondegenerate regular planar cubic Bézier curve has at most two isolated interior inflection points, since changes in signed curvature can occur only at zeros of this quadratic.

Show the calculation for the arch example

In our arch example, x′=6+12t−12t² and y′=15−30t, while x″=12−24t and y″=−30. Hence

x'y''-y'x''=-360+360t-360t^2=-360(1-t+t^2)\lt 0

The signed curvature never changes sign: this particular arch has no inflection point.

Discovery problems

  1. Midpoint identity. Express B(1/2) in terms of the four control points. What happens if P_0+P_3=P_1+P_2?
  2. Convex-hull challenge. Prove that every cubic Bézier curve stays in the convex hull of its control points. Does this still hold if the polygon is nonconvex?
  3. Exact self-intersection. For x(t)=(t−1/2)² and y(t)=(t−1/2)((t−1/2)²−1/16), find two distinct parameter values giving the same point and determine the crossing point.
  4. S-shaped design. Find two cubic Bézier curves from (0,0) to (3,0) and from (3,0) to (6,0) that meet with C^1 continuity and form an S-shaped path.

Solutions (click to reveal)

Solution 1: Midpoint identity
B\left(\frac12\right)=\frac{P_0+3P_1+3P_2+P_3}{8}

If P_0+P_3=P_1+P_2, this simplifies to B(1/2)=(P_0+P_3)/2, the midpoint of the endpoints.

Solution 2: Convex hull

All four Bernstein weights are nonnegative on [0,1] and add to one by the binomial theorem. Therefore B(t) is a convex combination of the control points. The convex hull exists regardless of whether the control polygon is convex, so the conclusion remains true.

Solution 3: Exact crossing

At t=1/4 and t=3/4, the squared term is 1/16 and the second factor of y(t) vanishes. Thus both parameter values yield (1/16,0). The two tangent directions are distinct, so this is a genuine transverse crossing.

Solution 4: A smooth S

Use P_0=(0,0), P_1=(1,2), P_2=(2,2), P_3=(3,0), followed by Q_0=(3,0), Q_1=(4,−2), Q_2=(5,−2), Q₃=(6,0). The join points agree and 3(P_3−P_2)=(3,−6)=3(Q_1−Q_0). Hence the joined curve is C^1, and the opposite signs of the upper and lower arches create the S shape.

Explore further. Bézier curves are used to model smooth, finite-degree paths. For a very different kind of parametric construction, read our Geometry and Calculus articles and explore how curves can behave beyond polynomial models.

Leave a Reply

Your email address will not be published. Required fields are marked *