Bezier Curves: Quadratic and Cubic Interactive Guide
Bezier curves are one of the most common tools for drawing smooth paths in computer graphics, UI motion, vector illustration, and font rendering. Even when a curve looks freehand, many systems represent it with a small set of control points and a deterministic equation. That makes Bezier curves both expressive and reliable: artists and engineers can shape motion and geometry with only a few values.
This article builds a practical understanding from the ground up. You will start with the quadratic case, then inspect how a single point on the curve is actually computed, and then move to cubic curves, which are the form most design tools expose.
Bezier Curve Fundamentals
A Bezier curve is defined by control points. The curve starts at the first control point and ends at the last control point. The points in between usually are not on the curve. Instead, they pull the curve direction and bend amount.
For a quadratic Bezier curve, there are three points:
- : start point
- : control point
- : end point
The formula uses a parameter from to :
You can read this as a weighted combination of points. At , all weight is on , so the curve point is at the start. At , all weight is on , so the curve point is at the end. Between them, weight shifts smoothly and produces a continuous path.
The key idea is that the equation guarantees smoothness by construction. You do not manually draw every intermediate point. You sample many times, evaluate , and connect those positions.
Quadratic Shape Exploration
Use this first visualization to build intuition for how the control point changes curve shape. Move the control point sliders and watch both the control polygon and final curve update.
, P1 = (320, 60)
As you experiment, focus on these observations:
- The curve always begins at and ends at .
- Moving changes the direction near both ends because it influences tangent direction.
- Pulling farther away increases curvature and can make the path arch strongly.
- Bringing closer to the segment from to makes the curve flatter.
A common beginner mistake is assuming the curve should pass through . For a quadratic curve, is usually an attractor, not a point on the path. This is exactly why Bezier curves are useful: you can steer shape indirectly and keep smoothness.
De Casteljau Construction
The equation view is compact, but there is another way to think about Bezier curves that is often easier to trust in code: De Casteljau’s algorithm. It computes a point on the curve using repeated linear interpolation.
For the quadratic case at a chosen :
- Interpolate between and to get .
- Interpolate between and to get .
- Interpolate between and to get .
That final point equals the same result as the quadratic formula. The advantage is that this interpolation procedure extends naturally to higher degree curves and is numerically stable in many implementations.
| t = 0.35 | Q0 = (160.5, 213.0) | Q1 = (397.5, 150.5) | B(t) = (243.5, 191.1)
Try moving the slider from to slowly. You will see and move along their line segments, while traces the blue curve. This gives an immediate geometric reason for why the curve stays inside the convex region formed by control points.
De Casteljau is also useful for splitting a curve into two smaller Bezier curves at any . That operation is widely used in rendering pipelines, adaptive tessellation, and hit-testing.
Tangents and Motion Direction
Bezier curves are often used for motion paths, not just static drawings. In animation, the local tangent direction matters because it tells you where an object is moving at that instant.
For a quadratic curve, the derivative is:
Two practical facts follow:
- At the start (), direction aligns with .
- At the end (), direction aligns with .
This is why moving the middle control point changes how the curve leaves and approaches endpoints. In UI animation tooling, this same concept appears as direction handles.
When motion must feel natural, path geometry alone is not enough. You also need a timing function for how changes over time. A path can be smooth while speed still feels abrupt if the parameter progression is not eased.
Cubic Bezier Curves
Most design and web tools prefer cubic Bezier curves. A cubic has four control points:
- : start
- : first handle
- : second handle
- : end
Its equation is:
Compared to quadratic, cubic adds one more handle and much more shape control. You can create S-curves, gentle transitions, or aggressive turns without chaining multiple segments too early.
| t = 0.50 | B(t) = (351.3, 180.0) | P1 = (220, 80) | P2 = (470, 280)
Use this workbench to inspect how each handle contributes:
- Move while holding fixed. The curve departure near the start changes the most.
- Move while holding fixed. The curve arrival near the end changes the most.
- Move both handles to opposite sides and notice how S-shaped paths emerge.
- Sweep the
Sample tslider and watch the highlighted point move along the curve.
This local-handle behavior is the reason vector editors expose tangent handles for anchors. Each segment can be tuned without redrawing the full path manually.
Piecewise Bezier Paths and Continuity
Real drawings are usually not a single curve. They are chains of Bezier segments. When connecting segments, continuity is the main quality concern.
Three useful continuity levels:
- continuity: segments meet at the same point.
- continuity: first derivatives match, so direction is continuous.
- continuity: second derivatives match, so curvature changes smoothly.
In many UI and icon workflows, is the practical baseline. If adjacent handles are arranged as collinear and balanced around a shared anchor, joins look visually smooth. For high-precision surfaces and simulation paths, stronger continuity constraints may matter.
Common Implementation Patterns
If you are implementing Bezier evaluation in code, these patterns are common:
- Sample at fixed
tsteps for simple drawing or previews. - Use adaptive subdivision when high curvature needs denser sampling.
- Use De Casteljau splitting for robust recursion and curve clipping.
- Cache sampled polylines for fast hit tests and approximate length.
A subtle point is that equal steps in t are not equal distances in space.
If constant-speed motion is required, you usually need arc-length approximation and remapping.
For many UI animations this approximation is sufficient and cheaper than exact symbolic solutions.
Typical Use Cases
Bezier curves appear in many systems, often behind friendly editors:
- SVG path commands in web graphics
- Font glyph outlines in text rendering
- Camera rails and object trajectories in 3D tools
- Easing curves for CSS and animation timelines (usually 1D cubic forms)
- Shape interpolation tools in illustration software
Although the interfaces differ, the underlying concept is the same: control points define smooth trajectories with predictable endpoint behavior.
Practical Mental Checklist
When a curve does not look right, this checklist helps debug quickly:
- Confirm endpoint positions first.
- Inspect handle directions near each endpoint.
- Check handle lengths for over-bending.
- Verify segment continuity at joins.
- Separate path shape issues from timing/easing issues.
This keeps geometry decisions and animation timing decisions from getting mixed. Most visual glitches come from one of those categories, and the fix depends on identifying which one is wrong.
Bezier curves are popular because they compress expressive shape into a small, editable parameter set. Once you understand control-point influence, De Casteljau interpolation, and continuity between segments, they become a dependable tool instead of a mysterious one.