AI Glossary / Mathematics and optimization / Intermediate

De Casteljau's algorithm

Definition

De Casteljau's algorithm evaluates a Bézier curve by repeatedly interpolating between neighboring control points. For a chosen parameter t, each interpolation uses the same weights, 1−t and t. After successive rounds reduce the control polygon to one point, that point is the curve's position at t.

What it means

A Bézier curve is specified by an ordered collection of control points. The first and last points are its endpoints; the intermediate points influence its shape without generally lying on it. De Casteljau's construction turns this geometric description into an evaluation procedure.

For a degree-n curve there are n+1 control points and n rounds of interpolation. The familiar interval 0≤t≤1 runs from the first endpoint to the last. Equal increments of t do not necessarily correspond to equal travel distances, so evaluation and constant-speed movement are different tasks.

How it works

Begin with the original control points. For every neighboring pair A and B, compute (1−t)A+tB. These new points form a shorter control polygon. Apply the same operation to neighboring points in that polygon and continue until only one remains.

For t between zero and one, each intermediate point lies on the corresponding line segment. This gives a clear geometric construction and favorable numerical behavior compared with carelessly expanding high-degree polynomials. It does not remove all rounding error or conditioning problems.

An iterative triangular calculation reuses intermediate results. A direct recursive implementation that repeatedly recomputes identical subproblems wastes work. For a degree-n curve, the straightforward triangle uses n(n+1)/2 vector interpolations. The intermediate triangle can also support splitting a curve into Bézier pieces, provided the new control points and parameter mappings are taken correctly.

Three practical examples

1. Vector graphics: calculate points on a Bézier path used for an illustration, icon, or font outline.

2. Animation: evaluate a curved position path at a chosen parameter, with a separate timing function controlling motion along it.

3. Geometry editing: split a Bézier segment into smaller segments for local editing or adaptive display, while preserving the represented shape.

Think of it this way

Imagine placing a marker partway along every edge of a polygonal chain, then repeating the process on the shorter chain of markers. The same chosen fraction is used on every edge and in every round. Eventually only one marker remains.

This is a geometric construction, not a physical simulation. The markers do not exert forces, and their convergence within one evaluation does not mean an animated object moves with constant speed.

Worked example

Consider an original quadratic Bézier curve with P0=(0,0), P1=(2,4), and P2=(6,0). Evaluate it at t=0.25, so every interpolation uses weights 0.75 and 0.25.

The first round gives Q0=0.75P0+0.25P1=(0.5,1), and Q1=0.75P1+0.25P2=(3,3). The final round gives B(0.25)=0.75Q0+0.25Q1=(1.125,1.5).

Check independently with the quadratic formula: B(t)=(1−t)²P0+2t(1−t)P1+t²P2. At t=0.25, the weights are 0.5625, 0.375, and 0.0625. They sum to 1 and produce x=0.75+0.375=1.125 and y=1.5.

At t=0.5, the point is (2.5,2), which is not the midpoint (3,0) of the two endpoints. The intermediate control point changes the curve's shape. These calculations verify specific curve positions; they do not establish arc length, speed, or collision clearance. No software execution is claimed.

Illustrative case study

Fictional case: Lark Studio animates a delivery marker along a curved illustration. Its developer evaluates the Bézier path correctly, but the marker appears to speed up and slow down when t increases uniformly.

The team checks several positions using the interpolation triangle and confirms that the evaluator is consistent. It then treats timing as a separate design problem, using a distance-based lookup when uniform visual speed is desired. The case shows why a correct geometric algorithm can coexist with unsuitable motion timing; it does not report results from a real studio.

Common misconceptions and mistakes

Do not interpret the middle control points as compulsory waypoints. A quadratic curve generally passes near its middle control point rather than through it.

Do not change t between rounds within a single standard evaluation. Every round uses the same parameter. Also, distinguish the degree from the number of control points: three points define a quadratic, not a cubic, Bézier curve.

Extrapolation beyond [0,1] loses the simple convex-combination interpretation. Numerical stability within the usual domain is not a license to ignore extreme coordinates, precision requirements, or degenerate geometry.

Business use

This construction provides an understandable foundation for graphics and geometry features. Its intermediate values make it useful for debugging: a developer can inspect every blend rather than relying solely on a rendered image.

For a product implementation, check endpoint reproduction, agreement with simple known curves, coordinate units, and behavior under scaling. Evaluate whether repeated point sampling or curve subdivision better fits the rendering task. If curves control a physical process, apply the relevant motion and geometry constraints separately; curve evaluation alone does not certify operational suitability.

People also ask

Is it a different curve from the Bernstein-polynomial formula?

No. Both describe the same Bézier curve; they are different ways to evaluate it.

Does it work in three dimensions?

Yes. Apply the same weighted combinations to three-coordinate points, just as to two-coordinate points.

Must the algorithm use recursion?

No. An iterative table or in-place working array avoids the repeated calculations of a naive recursive implementation.

Check your understanding

With the worked control points and t=0, what does every round ultimately produce?

Answer: Each blend selects its left input because the weights are 1 and 0. The final result is P0=(0,0), confirming the starting endpoint. Similarly, t=1 produces the last control point.

Related terms

  • Linear interpolation
  • De Boor's algorithm
  • Bézier curve
  • control polygon
  • Bernstein polynomial
  • curve subdivision
  • numerical stability
  • parameterisation
  • arc length

Learn next

Recalculate the quadratic example at t=0.75 and compare with the polynomial formula. Then draw the full interpolation triangle for a cubic curve with four control points. Study how the triangle yields subdivision control points before investigating adaptive rendering or constant-speed traversal. Keep geometric position, parameter value, and traveled distance distinct throughout.

More in Mathematics and optimization

  • Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
  • Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
  • Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
  • Σ-algebra
  • Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
  • Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.

Sources

Primary source: C.-K. Shene's Michigan Technological University course notes, “Finding a Point on a Bézier Curve: De Casteljau's Algorithm”, https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/de-casteljau.html . The interpolation construction, iterative pseudocode, and repeated-recursion discussion were read. Numerical coordinates, independent formula check, and fictional application are original teaching material.

Previous: De Boor's algorithm Next: De Finetti's theorem

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer