Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How to Learn de Casteljau’s Algorithm: Linear Interpolation, Bézier Evaluation, Subdivision, Tangents and Robust Curve Geometry

Three students studying together in an eduKate small-group classroom.

Wait, What?

You can draw a curved Bézier path using nothing more exotic than repeated straight-line interpolation.

de Casteljau’s algorithm evaluates Bézier curves by repeatedly interpolating between neighboring control points. The same triangular construction also reveals subdivision, tangent information and a robust geometric way to reason about curves.

For a beginner, it is simply “take points between points, then repeat.” At intermediate level, you learn the recursive interpolation triangle and how the final point lies on the Bézier curve. At advanced level, the triangle gives subdivision control polygons, derivatives and surfaces. At professional level, the real issues are numerical robustness, adaptive tessellation, rational curves, precision, termination criteria and deciding when de Casteljau is preferable to faster evaluation formulas.

Quick Answer

Learn de Casteljau in this order: linear interpolation → control polygon → parameter t → one interpolation level → recursive triangle → final Bézier point → cubic worked example → convex-hull intuition → subdivision → tangent/derivative relation → surfaces → rational curves via homogeneous coordinates → adaptive flattening → numerical precision → production geometry tests.

1. Begin with linear interpolation

Given two points P and Q, linear interpolation at parameter t is:

lerp(P, Q, t) = (1-t)P + tQ

When t=0, the result is P. When t=1, it is Q. For 0<t<1, the result lies on the segment between them.

de Casteljau’s algorithm does not introduce a new geometric primitive. It keeps applying this one.

2. The control points define a Bézier curve

A Bézier curve of degree n uses n+1 control points:

P0, P1, ..., Pn

The control polygon is formed by joining neighboring control points. The curve generally does not pass through the interior control points; they influence its shape.

3. One level of de Casteljau

At parameter t, replace each neighboring pair by its interpolation:

P0' = lerp(P0, P1, t)
P1' = lerp(P1, P2, t)
...
P(n-1)' = lerp(P(n-1), Pn, t)

You now have one fewer point. Repeat until one point remains.

4. The recursive form

Write the original points as P_i^(0). Then define:

P_i^(r) = (1-t) P_i^(r-1) + t P_(i+1)^(r-1)

for levels r = 1 ... n. The final point P_0^(n) is the Bézier curve point at parameter t.

5. A quadratic example

Use:

P0 = (0,0)
P1 = (2,4)
P2 = (6,0)
t  = 0.5

First level:

Q0 = 0.5 P0 + 0.5 P1 = (1,2)
Q1 = 0.5 P1 + 0.5 P2 = (4,2)

Second level:

R0 = 0.5 Q0 + 0.5 Q1 = (2.5,2)

So the curve point at t=0.5 is (2.5,2).

6. A cubic produces a triangle of points

For four control points P0,P1,P2,P3:

level 0: P0   P1   P2   P3
level 1:   Q0   Q1   Q2
level 2:     R0   R1
level 3:       B(t)

This triangular diagram is one of the best ways to learn the algorithm. Each point depends only on the two points directly above it.

7. Why the method is geometrically intuitive

Every intermediate point for 0≤t≤1 is a convex combination of two earlier points. Repeating that process keeps the result inside the convex hull of the control points.

This gives an immediate geometric sanity check: a polynomial Bézier segment should not unexpectedly jump outside the convex hull of its controls.

8. Endpoint behavior is visible

At t=0, every interpolation chooses the left point, so the final result is P0. At t=1, every interpolation chooses the right point, so the final result is Pn.

The endpoints are therefore not special cases bolted onto the algorithm. They fall directly out of the recurrence.

9. Subdivision comes almost for free

The interpolation triangle contains more than the single point B(t). The left edge of the triangle gives the control points of the left subcurve from parameter 0 to t. The right edge, read appropriately, gives the control points of the right subcurve from t to 1.

For a cubic:

left  controls: P0, Q0, R0, B(t)
right controls: B(t), R1, Q2, P3

This is one of de Casteljau’s greatest practical strengths.

10. Subdivision is not just an academic trick

Subdivision supports:

  • adaptive curve drawing;
  • curve clipping;
  • intersection algorithms;
  • flatness testing;
  • bounding-box refinement;
  • conversion into smaller parameter ranges;
  • robust recursive geometric algorithms.

The same work used to evaluate a point can split the curve into two exact Bézier segments.

11. Tangent information appears near the bottom of the triangle

For a degree-n Bézier curve, after n-1 interpolation levels there are two points remaining, call them A and B. The curve derivative at that parameter is:

B'(t) = n (B - A)

So the final segment in the de Casteljau triangle points in the tangent direction.

This is a powerful connection: evaluation and differential geometry are not separate stories.

12. The derivative curve is itself Bézier

The derivative control points are:

D_i = n (P_(i+1) - P_i)

These define a Bézier curve of degree n-1. Evaluating that derivative curve at t gives the tangent vector.

For motion along a path, this tangent can drive orientation, speed analysis and continuity checks.

13. Curvature requires more than the first derivative

For planar or spatial curves, curvature depends on first and second derivatives. Those derivatives can also be represented as lower-degree Bézier curves derived from finite differences of the control points.

Professional geometry code should distinguish position evaluation, tangent direction, speed magnitude and curvature rather than treating them as one quantity.

14. de Casteljau and the Bernstein formula are equivalent

A Bézier curve can also be written directly using Bernstein basis polynomials:

B(t) = Σ C(n,i) (1-t)^(n-i) t^i P_i

de Casteljau evaluates the same polynomial curve through recursive interpolation instead of explicitly forming the basis terms.

Knowing both views is useful: Bernstein form exposes the algebra; de Casteljau exposes the geometry.

15. Why not always evaluate with the explicit polynomial?

Direct polynomial evaluation may require fewer arithmetic operations in some settings, especially when evaluating many points on a low-degree curve with optimized code.

de Casteljau remains attractive because it is simple, geometrically meaningful, naturally supports subdivision and is widely regarded as numerically well behaved.

Professional code chooses an evaluation method according to the job rather than assuming one formula dominates everywhere.

16. Complexity

A straightforward degree-n de Casteljau evaluation performs:

n + (n-1) + ... + 1 = n(n+1)/2

linear interpolations, so the arithmetic cost is O(n²).

For ordinary cubic Bézier graphics, n=3, so the constant is tiny. For very high degrees or massive batch evaluation, the choice of representation and algorithm matters more.

17. In-place evaluation reduces memory

You do not need to store the entire triangle if you only want the final point:

work = copy(control_points)
for r in 1..n:
    for i in 0..n-r:
        work[i] = lerp(work[i], work[i+1], t)
return work[0]

This uses O(n) auxiliary space.

18. Keep the full triangle when teaching or subdividing

An optimization is not always the best learning representation. Storing every interpolation level makes the data flow visible and gives subdivision points directly.

Use the triangle first. Optimize memory only after the learner can reconstruct the recurrence.

19. Bézier surfaces extend the same operation

A tensor-product Bézier surface uses a grid of control points and two parameters u and v. A common approach is:

  1. evaluate one Bézier curve across each row using u;
  2. take the resulting points as controls of another Bézier curve;
  3. evaluate that curve using v.

The 2026 UC Berkeley CS184 materials teach this separable extension directly.

20. Rational Bézier curves use homogeneous coordinates

Weights can extend polynomial Bézier curves into rational Bézier curves, which can represent conic sections such as exact circular arcs.

A standard method lifts each weighted control point into homogeneous coordinates, performs de Casteljau there and divides by the final homogeneous weight at the end.

This connects the algorithm to NURBS and CAD geometry, but it also introduces new numerical concerns when weights are extreme or the denominator approaches zero.

21. Adaptive tessellation

Rendering systems often need a polyline approximation rather than isolated curve evaluations. A common strategy is:

  1. estimate how far the control polygon is from a straight segment;
  2. if sufficiently flat, emit a line segment;
  3. otherwise subdivide with de Casteljau and recurse.

This puts more line segments where curvature demands them and fewer where the curve is nearly straight.

22. The flatness criterion is part of correctness

“Looks flat enough” must become a quantitative rule. Options include distances of interior control points from the endpoint chord, angular criteria or screen-space error bounds.

A professional renderer ties the threshold to output resolution, transforms and the intended geometric tolerance.

23. Recursion needs a termination safeguard

Adaptive subdivision should have both an error criterion and a maximum depth. Degenerate control points, extreme scales or floating-point behavior can otherwise produce pathological recursion.

Defensive geometry code fails predictably rather than recursing forever.

24. Precision matters at extreme scales

If coordinates are extremely large while differences are tiny, floating-point subtraction can lose detail. If t is extremely close to 0 or 1, repeated interpolation can also expose precision limits.

Use coordinate normalization, suitable numeric precision and error budgets appropriate to the application.

25. Affine invariance is a major practical property

Because de Casteljau uses affine combinations, applying an affine transformation to the control points and then evaluating gives the same result as evaluating first and transforming the point afterward.

Translation, rotation, scaling and shear therefore interact cleanly with the construction.

26. Learn by drawing the triangle before coding

A strong first lesson uses four control points on graph paper. Pick t=1/2 so the arithmetic is easy, draw every midpoint and keep going until one point remains.

Then repeat at t=1/4. The learner should predict where the point moves before calculating it.

27. Programming education: visual state makes the algorithm learnable

Algorithm-visualization research and modern graphics courses both exploit the fact that de Casteljau has observable intermediate geometry. A good sequence is:

  • Predict: estimate the next interpolated points.
  • Run: step one interpolation level at a time.
  • Investigate: explain why the points stay within the current polygon.
  • Modify: drag one control point and predict which parts of the curve change.
  • Make: implement evaluation and subdivision after the geometric recurrence is secure.

The visible construction lowers the gap between formula and program state.

28. A completion exercise

Give learners code that computes one interpolation level:

for i in range(len(points)-1):
    next_points.append( ______ )

Ask them to fill the expression, then explain why the next list is one element shorter. Later, remove the outer recursion too.

This teaches the subgoals of the procedure before full independent implementation.

29. Tests every implementation should pass

  • t=0 returns the first control point.
  • t=1 returns the last control point.
  • A degree-1 curve equals ordinary linear interpolation.
  • Subdivision’s two segments join exactly at the evaluated point.
  • Reversing control points gives the same geometric curve with reversed parameterization.
  • Affine-transforming controls commutes with evaluation within numerical tolerance.
  • For 0≤t≤1, results respect convex-hull expectations.

30. Differential testing

Compare de Casteljau evaluation against a Bernstein-basis implementation for random low-degree curves. The two methods should agree within a defined floating-point tolerance.

When they disagree, inspect scale, conditioning and the tolerance rather than immediately assuming one routine is wrong.

31. Professional geometry is tolerance-aware

Exact equality between floating-point points is usually the wrong contract. Use explicit absolute/relative tolerances or application-specific geometric predicates.

CAD, font rendering, animation and scientific geometry can require very different error budgets.

32. Common failure states

  • Using t outside the intended interval without knowing that this extrapolates.
  • Updating control points in place in an order that overwrites values still needed.
  • Confusing degree with number of control points.
  • Assuming interior control points lie on the curve.
  • Discarding the triangle before learning subdivision.
  • Using exact floating-point equality for geometric tests.
  • Recursing adaptively without a maximum depth.
  • Calling a polyline approximation the exact Bézier curve.
  • Using polynomial Bézier logic for weighted rational curves without homogeneous coordinates.
  • Optimizing evaluation before validating geometry.

33. Beginner-to-professional learning ladder

  • Beginner: perform repeated interpolation by hand for a quadratic curve.
  • Foundation: draw and explain the full de Casteljau triangle for a cubic.
  • Intermediate: implement point evaluation and exact subdivision.
  • Advanced: derive tangent information, surfaces and rational homogeneous evaluation.
  • Professional: build adaptive tessellation with explicit error bounds, precision strategy, recursion safeguards, differential tests and application-specific performance measurements.

34. When de Casteljau is not the whole solution

For dense batch evaluation, a specialized polynomial evaluator, forward differences or GPU-specific method may be faster. For large spline networks, Bézier segments may be only one representation inside a broader B-spline/NURBS system.

The professional question is not “is de Casteljau elegant?” It is “does its stability, subdivision structure and geometric clarity match the task?”

35. Ownership boundary

This article owns the public de Casteljau learning job: interpolation, Bézier evaluation, subdivision, derivatives, surfaces, rational extension and robust geometric implementation. It does not redefine learner-state systems, assessment calibration, studying interfaces or private eduKate implementation machinery.

Sources and further reading

  • UC Berkeley CS184/284A Spring 2026, Bézier Curves and Surfaces implementation section: Berkeley.
  • UC Berkeley CS284 lecture material on de Casteljau evaluation, subdivision and tangent directions: Berkeley CAGD.
  • Cornell CS4620 computer graphics material using de Casteljau for Bézier subdivision: Cornell.
  • UC Berkeley CS184/284A lecture material on Bézier curves and surfaces: course slides.
  • Margulieux, Morrison and Decker, subgoal-labeled worked examples in introductory programming: International Journal of STEM Education.
  • Sentance, Waite and Kallia, PRIMM programming pedagogy: SIGCSE.

Professional rule: you understand de Casteljau when you can reconstruct the interpolation triangle, extract both subdivision control polygons, derive the tangent from the penultimate level and state the numerical tolerance used by your production geometry.