Bézier Curve Calculator
Plot interactive quadratic, cubic, and higher-degree Bézier splines, evaluate De Casteljau recursive linear interpolations, measure tangent velocity and curvature, export clean SVG paths, and test CSS cubic-bezier() animation easings.
Control Point Manager
CSS Timing Function Editor
De Casteljau & Bernstein Inspector
Bézier Curve Definition and Standard Formulas
A Bézier curve is a parametric polynomial curve controlled by n + 1 points P₀ through Pₙ via Bernstein basis weights. As parameter t moves from 0 to 1, the curve interpolates smoothly from start anchor P₀ to end anchor Pₙ while curving toward the intermediate handles inside their convex hull.
Parametric Definition and Bernstein Polynomial Basis
In computational geometry and computer-aided geometric design (CAGD), an explicit Cartesian equation of the form fails whenever a curve turns vertically, doubles back on itself, or forms a closed loop. Parametric representation solves this limitation by expressing each coordinate independently as a continuous function of a scalar parameter . A Bézier curve of degree is defined by ordered control points weighted by the Bernstein basis polynomials of degree :
Here denotes the binomial coefficient from Pascal’s triangle, ensuring smooth symmetric blending across the interval from to .
Formulated independently in 1959 by French physicist and mathematician Paul de Casteljau at Citroën and popularized in 1962 by Renault engineer Pierre Bézier for sculpting automobile chassis surfaces, Bernstein-basis curves possess five structural properties that make them reliable for engineering software, coordinate geometry visualization, and real-time rendering pipelines:
Endpoint Interpolation and Tangency
At , only is nonzero, forcing . At , only is nonzero, forcing . Moreover, the curve leaves tangent to segment and arrives at tangent to .
Partition of Unity and Convex Hull Bound
By the binomial theorem, and every weight satisfies for . Because is a convex combination of its control points, the curve never exits the convex hull polygon enclosing —a property critical for bounding-box culling and collision checks.
Affine Transformation Invariance
Rotating, translating, scaling, or shearing a Bézier curve produces the exact same result whether you transform every evaluated curve point or simply transform the control points first and evaluate afterward: .
Variation-Diminishing Property
No straight line in the plane can intersect a planar Bézier curve more times than it intersects the polyline formed by its control polygon. As a result, Bézier curves never introduce spurious high-frequency oscillations or ringing artifacts when control points are smoothly aligned.
Linear, Quadratic, Cubic, and Matrix Formulations
While Bernstein polynomials define curves of arbitrarily high degree, real-world graphics engines, CAD kernels, and typography standards standardize primarily on degree 1 (linear), degree 2 (quadratic), and degree 3 (cubic) Bézier segments. Higher-order geometries are typically constructed by chaining cubic segments together rather than raising the polynomial degree, which reduces computational cost and improves local editability.
Linear Bézier Curve (Degree 1, Two Points)
With two control points and , the curve reduces to direct linear interpolation between endpoints, matching the formula used in our Linear Interpolation Calculator:
Quadratic Bézier Curve (Degree 2, Three Points)
Adding a single off-curve handle yields a second-degree curve whose image is always a segment of a true mathematical parabola (compare with conic locus geometry in our Parabola Calculator):
Its peak influence from handle occurs at , where the weights are . Because a quadratic polynomial has a constant second derivative , a single quadratic segment cannot form an inflection point (S-curve).
Cubic Bézier Curve (Degree 3, Four Points) and Matrix Form
Four control points yield the lowest-degree polynomial curve capable of non-planar 3D twisting, S-shaped inflection points, and self-intersecting loops:
Expressing in monomial power-basis matrix form allows GPU vertex shaders and rasterizers to precompute polynomial coefficients once per curve and evaluate points with minimal multiply-add operations.
| Curve Type | Control Points | Inflection / Loops | SVG / Font Standard | Primary Advantage |
|---|---|---|---|---|
| Linear (Degree 1) | 2 | None | SVG L | Zero curvature; exact straight segments |
| Quadratic (Degree 2) | 3 | None (parabolic arc) | SVG Q / TrueType (.ttf) | Analytic arc length; rapid rasterization |
| Cubic (Degree 3) | 4 | Up to 2 inflections or 1 loop | SVG C / OpenType (.otf) / CSS | Independent start/end tangents; S-curves |
| Quartic / Quintic (4–5) | 5–6 | Multiple inflections | Robotics / Motion Control | Minimum-jerk & snap-continuous paths |
De Casteljau’s Recursive Algorithm and Curve Subdivision
Evaluating high-degree polynomials directly in the monomial power basis can suffer from catastrophic floating-point cancellation when coefficients alternate with large magnitudes. De Casteljau’s algorithm avoids power expansion entirely by replacing algebra with a pyramid of convex linear interpolations between adjacent points. Given control points , each recursive tier computes:
Crucially, De Casteljau’s triangle simultaneously solves exact curve subdivision. The left diagonal of the triangle——forms the exact control polygon for the sub-curve spanning , while the right diagonal——forms the exact control polygon for the remaining sub-curve spanning . Graphics renderers leverage this property recursively to flatten curves into adaptive line segments whenever the control polygon height falls below a half-pixel tolerance, and you can test this splitting behavior directly using the Split Left [0, t] action inside the De Casteljau Inspector tab above.
Derivatives, Curvature, Arc Length, and Spline Continuity
Understanding how a Bézier curve moves, bends, and joins neighboring segments requires differentiating the Bernstein polynomial with respect to —a foundational operation in parametric calculus that connects directly to our Derivative Calculator and Slope Calculator. Because the derivative of a degree- Bézier curve is another Bézier curve of degree scaled by , the first and second derivatives are written cleanly in terms of forward differences :
From these equations, and . Notice that the magnitude of the tangent vector depends on the Euclidean distance between each anchor and its neighboring handle. Meanwhile, total curve length generally lacks an elementary closed-form integral for cubic splines and is evaluated numerically via Gauss-Legendre quadrature or adaptive chord summation, as explored in our Arc Length Calculator.
C⁰ Positional Continuity
Segment A’s end anchor equals Segment B’s start anchor (). The path is connected, but can form a sharp corner cusp.
G¹ vs C¹ Tangent Continuity
Collinear handles ( with ) produce smooth G¹ visual tangency; setting ( at the exact midpoint of and ) enforces velocity-matched C¹ continuity.
G² Curvature Continuity
Required for Class-A automotive reflections and high-speed rail tracks: matching curvature across segment joins eliminates abrupt lateral acceleration jumps and optical reflection kinks.
CSS cubic-bezier() Easing Functions and SVG Path Syntax
Two of the most widespread daily uses of Bézier mathematics in front-end engineering are CSS timing functions and Scalable Vector Graphics (SVG) paths. Although both use four-point cubic formulations, their coordinate constraints and evaluation mechanics differ fundamentally.
CSS Easing: Time vs Progress
A CSS timing curve fixes and , leaving four tunable scalar inputs . Here represents normalized elapsed time and represents normalized output progress. Because every timestamp must map to a unique progress value, W3C CSS Easing Level 1 mandates so remains monotonic. Browsers invert numerically (Newton-Raphson plus bisection fallback) to find , then return .
- ease: cubic-bezier(0.25, 0.10, 0.25, 1.00)
- ease-in: cubic-bezier(0.42, 0.00, 1.00, 1.00)
- ease-out: cubic-bezier(0.00, 0.00, 0.58, 1.00)
- ease-in-out: cubic-bezier(0.42, 0.00, 0.58, 1.00)
SVG Path Commands and Conic Approximations
Inside an SVG <path> element, quadratic Béziers use Q x1 y1, x2 y2 (with smooth mirrored continuation T x2 y2), while cubic Béziers use C x1 y1, x2 y2, x3 y3 (with smooth G¹ continuation S x2 y2, x3 y3). Notice that because polynomial Béziers cannot match exact circular or elliptical trigonometry, vector illustrators approximate a circle or ellipse using four cubic quadrants with handle distance (read more in our Conic Sections Guide).
<path d="M 80,360 C 200,60 480,60 600,360" fill="none" stroke="#2563eb" stroke-width="3" />
Industry Applications in Typography, CAD, and Robotics
Beyond web design and SVG graphics, composite Bézier curves serve as the geometric backbone across precision manufacturing, font engineering, and autonomous motion planning:
Digital Typography (TrueType & OpenType)
TrueType (.ttf) and WOFF fonts store character outlines as chains of quadratic Bézier curves with implicit midpoints between consecutive off-curve handles, enabling rapid GPU signed-distance-field rendering. PostScript and CFF OpenType (.otf) fonts use cubic Béziers to model serif curves with fewer anchor points.
Aerospace & Automotive CAD Surfaces
Tensor-product Bézier patches—generalized into Non-Uniform Rational B-Splines (NURBS)—define fuselage skins, turbine blades, and automotive body panels. Surface normals and reflection lines are computed directly from partial derivatives and vector cross products along parametric grids.
Autonomous Robotics & Motion Control
Mobile robots, CNC toolpaths, and UAV drones generate collision-free corridors using quintic (degree-5) Bézier splines because they guarantee continuous position, velocity, and acceleration ( continuity), minimizing mechanical jerk while keeping the robot safely inside the obstacle-free convex hull. Tangent alignment with desired headings relies on dot product and vector projection checks.
Step-by-Step Worked Numerical Problems
Find the exact curve point and tangent vector at for , , and .
1. Evaluate the quadratic Bernstein weights at : , , and (note ).
2. Compute .
3. Compute .
4. Compute the first derivative . At , , confirming a horizontal apex tangent.
Result: B(0.5) = (50, 50) with horizontal tangent velocity B′(0.5) = (100, 0).
Use De Casteljau’s algorithm at for , , , and .
1. Tier 1 interpolations (): , , and .
2. Tier 2 interpolations: and .
3. Tier 3 final point: .
Result: B(0.25) = (12.5, 45); left sub-curve control points are (0, 0), (0, 20), (5, 35), (12.5, 45).
Evaluate time and progress at for standard CSS cubic-bezier(0.25, 0.1, 0.25, 1.0) (ease).
1. Endpoints are fixed at and , with and .
2. At , the cubic weights are .
3. Elapsed time coordinate: (31.25% of animation duration).
4. Property progress coordinate: (53.75% of transition distance).
Result: By 31.25% elapsed duration, the CSS ease curve has already completed 53.75% of the motion.
Common Mathematical and Implementation Pitfalls
Assuming the Curve Passes Through Intermediate Control Handles
Only the start anchor and end anchor are guaranteed to lie on the curve. Intermediate points govern tangent directions and curvature pull without being interpolated. When you need a smooth curve that passes directly through every waypoint, convert waypoints into Catmull-Rom or interpolating cubic Hermite spline segments first.
Confusing Parameter t with Constant Arc-Length Speed
Stepping uniformly (for example, incrementing by 0.01 per animation frame) rarely moves an object at uniform spatial speed because fluctuates with handle spacing. For constant-velocity motion along a track, precompute a cumulative chord-length lookup table and binary-search for each target arc distance.
Using Single High-Degree Curves Instead of Piecewise Cubic Splines
Increasing a single Bézier curve above degree 5 makes every control point exert weak global influence across the entire span and increases polynomial conditioning errors. Professional drawing tools keep individual segments at degree 3 and chain them with or handle alignment for localized editing control.
Computational Methodology and Editorial Standards
All numerical calculations inside this Bézier Curve Calculator execute locally in your browser using IEEE-754 double-precision floating-point arithmetic. Rather than expanding high-order monomial powers, every curve evaluation, animation frame, and subdivision split uses recursive De Casteljau interpolation to preserve precision near endpoints and inflection points. Arc length is approximated by adaptive composite chord summation across user-configurable step counts (20–200 segments), first-derivative tangent velocity and signed curvature are evaluated via central finite differences, and convex hull boundaries are constructed using Andrew’s monotone-chain algorithm.
Authoritative Mathematical & Specification References
- Gerald Farin, Curves and Surfaces for CAGD: A Practical Guide (5th ed., Morgan Kaufmann) — Bernstein polynomial theory, De Casteljau subdivision, and geometric continuity.
- Michael E. Mortenson, Geometric Modeling (3rd ed., Industrial Press) — Parametric cubic matrix representations and differential geometry.
- W3C CSS Easing Functions Level 1 & SVG 2 Path Data Specifications — Normalized
cubic-bezier()domain constraints andQ/Cvector path grammar.
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.