Bézier Curves

The de Casteljau Algorithm

Algorithm Overview

Given control points \(\mathbf{b}_0,\ldots,\mathbf{b}_n\) of a Bézier curve \(\sum_{i=0}^n\,B_i^{\Delta,n}(u)\,\mathbf{b}_i\), evaluate: \[ \begin{align} \mathbf{b}_i^0 &:=\mathbf{b}_i\notag\\ \mathbf{b}_i^j &:=\frac{t-u}{t-s}\,\mathbf{b}_{i}^{j-1}+\frac{u-s}{t-s}\,\mathbf{b}_{i+1}^{j-1}\,\quad i= 0,\dots,n-j \end{align} \]

Then: \(\mathbf{b}_0^n=F(u)\) is a point on the Bézier curve.

Note: The points \(\mathbf{b}_i^j\) depend on parameter \(u\) for \(\;0\leq i\leq n-j\;\).



The JavaScript Code