Rational Bézier Curves

The de Casteljau Algorithm for Rational Curves

Definition: Rational Bézier curve, central projection A rational Bézier curve in \(\mathbb{R}^d\;(d=2,\,3)\) is the central projection of a polynomial Bézier curve in \(\mathbb{R}^{d+1}\).

Definition: Rational Bézier curve, analytical view Given control points \(\mathbf{b}_0,\ldots,\mathbf{b}_n \in \mathbb{R}^d, d \geq 2\), and weights \(w_0\ldots,w_n\geq 0,\;w_i\in\mathbb{R}, \; \text{and}\;w_0 = w_n = 1\), then \[ R(u):=\frac{\sum_{i=0}^n\,B_i^n(u)\cdot w_i\cdot\mathbf{b}_i} {\sum_{i=0}^n\,B_i^n(u)\cdot w_i},\quad u\in[0,1] \] is called rational Bézier curve over the interval \([0,1]\).

The points \(\mathbf{b}^h_n=(w_i\cdot\mathbf{b}_i,\, w_i)\in\mathbb{R}^{d+1}\) are the control points of the Bézier curve in \(\mathbb{R}^{d+1}\).

de Casteljau in homogeneous coordinates

Evaluate de Casteljau in the next higher dimension and project the result onto the hyperplane \(w=1\) \[ \begin{pmatrix} w_i^j\ \mathbf{b}_i^j \\ w_i^j\ \end{pmatrix}= \frac{1-u}{t-s}\, \begin{pmatrix} w^{j-1}_i\ \mathbf{b}_i^{j-1} \\ w^{j-1}_i\ \end{pmatrix}+\frac{u-s}{t-s}\,\begin{pmatrix} w_{i+1}^{j-1}\ \mathbf{b}_{i+1}^{j-1} \\ w_{i+1}^{j-1}\ \end{pmatrix} \]

Select and drag control points in order to interact with the graphic representation. Use the sliders to change the values of the weights, and observe how the curve behaves.



The JavaScript Code