Linear Bezier spline is obtained by *linear interpolation* between
two *control points* **P**_{0} , **P**_{1}

**P**(t) = (1-t)**P**_{0} +
t**P**_{1} , 0 ≤ t ≤ 1

*An interactive Java applet.* Drag the mouse to move the nearest control
point (a small blue square).
In the right applet window you see basis polynomials of the linear Bezier
spline. The red line is *(1-t)* and the green one is *t*.

(Sorry if your browser doesn't support
Java.)

**Quadratic Bezier spline**

Quadratic Bezier spline is obtained by *deCasteljau algorithm* as
a linear interpolation between linear interpolation between control points
**P**_{0} , **P**_{1} , **P**_{2}

**P**_{0}^{1} =
(1-t)**P**_{0} + t**P**_{1} ,
**P**_{1}^{1} =
(1-t)**P**_{1} + t**P**_{2} ,

**P**(t) = (1-t)**P**_{0}^{1} +
t**P**_{1}^{1} =
(1-t)[(1-t)**P**_{0} + t**P**_{1}] +
t[(1-t)**P**_{1} + t**P**_{2}] =
(1-t)^{2}**P**_{0} +
2(1-t)t**P**_{1} + t^{2}**P**_{2} ,

* P(t) = ∑_{i=0,2}
B_{i}^{2}(t) P_{i}*

where

You see basis polynomials

By construction Bezier spline goes through its terminal control points, i.e.

Note that

**Cubic Bezier spline**

In a similar way one can use deCasteljau algorithm to
interpolate a curve between *(n+1)* control points
* P_{0} , P_{1} ... P_{n}* .
E.g. for

Points

**How to plot Bezier spline**

DeCasteljau iterations

**P**_{i}^{j} =
(1-t)**P**_{i}^{j-1} + t**P**_{i+1}^{j-1},
j = 1, n i = 0, n-j

for *n = 3* are shown on the scheme in Fig.4

This algorithm is programmed as (see
Bezier.java too)

for (j = N-1; j > 0; j--) for (i = 0; i < j; i++){ Px[i] = (1-t)*Px[i] + t*Px[i+1]; Py[i] = (1-t)*Py[i] + t*Py[i+1]; }where

To obtain basis polynomials recurrence relations can be used

B

where

This algorithm is shown on the scheme in Fig.5a . It is programmed as

B[1] = 1; for (j = 1; j < N; j++) for (i = j+1; i > 0; i--) B[i] = (1-t)*B[i] + t*B[i-1];here

B[0] = 1; for (j = 0; j < n; j++) for (i = j; i => 0; i--){ B[i+1] += t*B[i]; B[i] += (1-t)*B[i]; }Bezier spline of degree

The general expression for Bezier spline of degree

B

where

From deCasteljau algorithm and Fig.4' it follows, that the control point

We see from (*) that this coefficient is

Further you can read more formal proof of the deCasteljau algorithm in More Bezier splines Math or go directly to Interpolating Lagrange curve.

Contents Next: More Bezier splines Math