Bézier curve
A Bézier curve is a parametric curve used in computer graphics and related fields. A sequence of "control points" creates a smooth, continuous curve using a formula. People often use it to approximate a real-world shape that has no simple mathematical description, or whose description is unknown or too complicated.
The Bézier curve is named after French engineer Pierre Bézier (1910–1999). In the 1960s, he used it to design curves for the bodywork of Renault cars. It is also used to design computer fonts and in animation. Bézier curves can be joined to form a Bézier spline, or extended to higher dimensions to form Bézier surfaces. The Bézier triangle is a special case of the latter.
In vector graphics, Bézier curves create smooth lines that can be made as large as needed without losing quality. The "paths" that image editing programs use are made of linked Bézier curves. Paths are not limited the way rasterized images are, and they are easy to change.
Bézier curves are also used to control movement over time, especially in animation and user interface design. For example, a Bézier curve can control how fast an object, such as an icon, moves from one place to another, instead of moving at a fixed speed. The smoothness of robot movements, such as those of a welding arm, can also be shaped this way so that the parts wear out less.
Invention
The math behind Bézier curves, the Bernstein polynomials, was set up in 1912. People did not use these polynomials for drawing until about 50 years later.
In 1959, mathematician Paul de Casteljau developed de Casteljau's algorithm, a numerically stable way of working out the curves. He was the first to use them for computer-aided design at the French car company Citroën. His method was patented in France but was not published until the 1980s. The Bézier polynomials became widely known in the 1960s through the French engineer Pierre Bézier, who discovered them separately and used them to design automobile bodies at Renault.
Specific cases
A Bézier curve is shaped by a list of control points, called P0 through Pn. The number n is the order of the curve: 1 for linear, 2 for quadratic, 3 for cubic, and so on. The first and last control points are always the ends of the curve, but the points in between usually do not lie on it. The calculations use affine combinations, where the amounts always add up to 1. A linear Bézier curve is just a straight line between two points, and it is the same as linear interpolation. The displacement vector shows the direction and distance from the start point to the end point. A quadratic curve is the path traced by a function using three points. The curve leaves the first point heading toward the middle point, then bends to arrive at the last point from that same direction. Its derivative shows that the tangents at the first and last points meet at the middle point.
A cubic Bézier curve uses four points. It starts at P0 heading toward P1 and arrives at P3 coming from the direction of P2. Usually it does not pass through P1 or P2, since those points only give direction. The distance between P1 and P2 decides how far and how fast the curve moves before turning. For some choices of points, the curve may cross itself or contain a cusp. Any four distinct points can be turned into a cubic Bézier curve that passes through all four in order. For some control points, the curve is an arc of a scaled and translated Tschirnhausen cubic. These curves form two similar triangles with the same orientation. They belong to Pythagorean hodograph curves, which have arc length and offset curves with a rational parameterization. They are the only cubic curves with these properties.
General definition
Bézier curves can be made for any degree. A recursive definition builds a curve of one degree from a linear combination (also called linear interpolation) of pairs of points on two curves of the degree below. This is shown in the animations below. The curve can also be written out directly using binomial coefficients and Bernstein basis polynomials. The points that shape the curve are called control points. Connecting them with straight lines forms a polygon, and the convex hull of that polygon contains the curve.
The curve can also be written as a polynomial, using the binomial theorem. High-order curves may lack numeric stability, so de Casteljau's algorithm should be used then. The curve starts at the first control point and ends at the last one. It is a straight line only when all its control points are collinear, and its ends are tangent to the first and last parts of the polygon. A circle cannot be described exactly, but a composite Bézier curve made of four piecewise pieces can come very close to one on a unit circle. Every quadratic curve is also a cubic one. Bézier curves have the variation diminishing property, and a curve of order higher than two may cross itself or have a cusp. A quadratic Bézier curve is also a segment of a parabola, which is a conic section, and the tangent lines and the perpendicular lines in that shape can be used to find its key features.
Constructing Bézier curves
A point B(t) moves along a line from P0 to P1, where t is the fraction of progress from 0 to 1. For example, when t=0.25, B(t) is one quarter of the way along the line. For a quadratic curve, two middle points, Q0 and Q1, move as t changes, and B(t) moves between them to draw a curved path.
Higher-order curves need more middle points. Cubic curves use points Q0, Q1, and Q2, plus R0 and R1, and fourth-order curves need even more. These methods rest on the process used in De Casteljau's algorithm to calculate Bézier curves.
A curve that stays at a fixed distance from a Bézier curve, called an offset or parallel curve in mathematics, usually cannot be exactly made with a Bézier curve. It works like the space between the rails of a railroad track. Approximate methods, called heuristic methods, are often good enough in practice. In vector graphics, drawing two offset curves on either side of a line is called stroking. This matters when converting fonts from Metafont into the more widely used PostScript type 1 fonts.
| Animation of a linear Bézier curve, t in [0,1] |
| Construction of a quadratic Bézier curve | Animation of a quadratic Bézier curve, t in [0,1] |
| Construction of a cubic Bézier curve | Animation of a cubic Bézier curve, t in [0,1] |
| Construction of a quartic Bézier curve | Animation of a quartic Bézier curve, t in [0,1] |
| Animation of a fifth-order Bézier curve, t in [0,1] in red. The Bézier curves for each of the lower orders are also shown. |
Degree elevation
A Bézier curve of degree n can be changed into a Bézier curve of degree n + 1 that has the same shape. This is useful when software can only work with certain degrees. For example, systems that only work with cubic Bézier curves can still work with quadratic curves by using their equivalent cubic version. The start and end points stay the same, and the new control points are found with a formula. This step can be repeated to get a series of control polygons, and as it repeats, the polygons approach the underlying curve. Degree reduction can only be done exactly when the curve was originally raised from a lower degree. Other approximation methods have been proposed and used in practice.
Rational Bézier curves
Rational Bézier curves add adjustable weights, which help them match many shapes more closely. They are built from control points, weights, and Bernstein polynomials. They can show parts of conic sections exactly, including circular arcs.
The idea can also work with number systems besides reals, such as the complex plane. There, a few points with certain weights can make a full circle with a radius of one. For points on a circle, the weights can be scaled without changing the shape. Scaling the central weight by 1.35508 gives a more even way of tracing the curve.
Applications
Bézier curves are widely used in computer graphics to draw smooth curves. Because a curve stays inside the convex hull of its control points, those points can be shown on screen and used to change the curve easily. Affine transformations such as translation and rotation can be applied by transforming the control points. Quadratic and cubic curves are the most common. Higher degree curves are more computationally expensive to work with, so for more complex shapes, simple curves are joined into a composite Bézier curve. This is often called a "path" in vector graphics languages like PostScript, standards like SVG, and programs like Artline, Timeworks Publisher, Adobe Illustrator, CorelDraw, Inkscape, and Allegro. To join curves without sharp corners, a property called G1 continuity makes the shared control point lie on the line through the control points on either side.
The simplest way to rasterizing a Bézier curve is to check many closely spaced points and connect them with short lines, but this may not look smooth. A common method is recursive subdivision, which splits the curve into halves again and again until each part is close to a straight line. Methods that intersect each scan line need roots of cubic polynomials, so they are not often used. Metafont approximates the curve with steps along pixel edges, and there is also a method by Zingl that uses a version of Bresenham's line drawing algorithm with simple integer math. In animation, programs like Adobe Flash and Synfig let users outline a path with Bézier curves, and the program creates the frames for an object to move along it. Bézier curves also control animation easing in CSS, JavaScript, JavaFx, and Flutter SDK. TrueType fonts use quadratic Bézier curves, while Asymptote, PostScript, Metafont, and SVG use cubic ones, and OpenType fonts can use either. Font engines like FreeType draw these curves using font rasterization, and Microsoft Excel uses a similar method for smooth chart lines. Since ellipses and circles cannot be exactly shown with Bézier curves, they are approximated, while NURBS can represent these curves exactly. In robotics, Bézier curves help plan the paths of robot end effectors, since the control points show whether a path hits any obstacles.

Quiz time!
5 questions about Bézier curve
What was Pierre Bézier's job?
Keep exploring
This article is a child-friendly adaptation of the Wikipedia article on Bézier curve, available under CC BY-SA 4.0.
Images from Wikimedia Commons. Tap any image to view credits and license.