Jump to content

de Casteljau's algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 72.196.249.3 (talk) at 23:06, 26 March 2008 (Definition). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In the mathematical subfield of numerical analysis the de Casteljau's algorithm, named after its inventor Paul de Casteljau, is a recursive method to evaluate polynomials in Bernstein form or Bézier curves. The de Casteljau's algorithm can also be used to split a single Bézier curve into two Bézier curves at an arbitrary parameter value.

Although the algorithm is slower for most architectures when compared with the direct approach it is numerically more stable.

Definition

Given a polynomial B in Bernstein form of degree n

where b is a Bernstein basis polynomial, the polynomial at point t<in>0</in> can be evaluated with the recurrence relation

with

.

Notes

When doing the calculation by hand it is useful to write down the coefficients in a triangle scheme as

When choosing a point t0 to evaluate a Bernstein polynomial we can use the two diagonals of the triangle scheme to construct a division of the polynomial

into

and

Example

We want to evaluate the Bernstein polynomial of degree 2 with the Bernstein coefficients

at the point t0.

We start the recursion with

and with the second iteration the recursion stops with

which is the expected Bernstein polynomial of degree n.

Bézier curve

When evaluating a Bézier curve of degree n in 3 dimensional space with n+1 control points Pi

with

.

we split the Bézier curve into three separate equations

which we evaluate individually using de Casteljau's algorithm.

Geometric interpretation

The geometric interpretation of de Casteljau algorithm is straightforward.

  • Consider a Bézier curve with control points . Connecting the consecutive points we create the control polygon of the curve.
  • Subdivide now each line segment of this polygon with the ratio t:1-t and connect the points you get. This way you arrive at the new polygon having one less segment.
  • Repeat the process till you arrive at the single point - this is the point of the curve corresponding to the parameter .

The following picture shows this process for a cubic Bézier curve:

References

  • Farin, Gerald & Hansford, Dianne (2000). The Essentials of CAGD. Natic, MA: A K Peters, Ltd. ISBN 1-56881-123-3

See also