More Bezier splines Math

Bernsein polynomials have next useful properties
    Si=0,n Bin(t) = 1,     (partition of unity)
    Bin(t) >= 0,     0 <= t <= 1

from this it follows
    Bin(t) <= 1,     0 <= t <= 1
    B0n(0) = 1,     Bin(0) = 0,
    Bnn(1) = 1,     Bin(1) = 0.

    d/dt Bin(t) = n ( Bi-1n-1(t) - Bin-1(t) ).

Affine Invariance

From the de Casteljau algorithm it follows that, any linear transformation (such as rotation or scaling) or translation of control points defines a new curve that is just the transformation or translation of the original curve (i.e. Bezier curve is affinely invariant with respect to its control points).

Convex hull

As linear interpolated points are contained in the convex hull of control points, then the Bezier curve is contained in the convex hull of its control points too.

Linear Precision

If all the control points form a straight line, the curve also forms a line. This follows from the convex hull property; as the convex hull becomes a line, so does the curve.
Moreover, you can test by hand, that for cubic Bernstein polynomials
    0 B03(t) + 1/3 B13(t) + 2/3 B23(t) + B33(t) = t.
Therefore for control points with coordinates
    P0,x = 0,  P1,x = 1/3,  P2,x = 2/3,  P3,x = 1
we get identical mapping (I used this as "1/3 rule")
    Px(t) = t.

Differentiation of the Bezier curve

Derivative of a curve gives the tangent vector at a point. From
    d/dt Bin(t) = n ( Bi-1n-1(t) - Bin-1(t) )
it follows that the derivatives at the endpoints of the Bezier curve are
    P'(0) = n (P1 - P0 ),     P'(1) = n (Pn - Pn-1 ).
Therefore the Bezier curve is tangent to the first and last segments of the control polygon, at the first and last control points. In fact, these derivatives are n times the first and last legs of the control polygon.
The second derivatives are
    P"(0) = n(n-1)(P2 - 2P1 + P0 ),     P"(1) = n(n-1)(Pn - 2Pn-1 + Pn-2 ).

Deriving deCasteljau algorithm

We use Bernstein polynomials recurrence relations to get the first step of deCasteljau iterations
    P(t) = P0n = Si=0,n Bin Pi = Si=0,n Pi [ (1 - t)Bin-1 + tBi-1n-1] =
    (1 - t)Si=0,n-1 Pi Bin-1 + tSi=0,n-1 Pi+1 Bin-1 = (1 - t)P0n-1 + tP1n-1
    Pmk = Si=0,k Bik Pi+m .
In a similar way we get the general deCasteljau equation for Pmk.

How to make a spline curve (two remarks)

These pages were written mainly to illustrate (and motivate) appearence of spline curves and surfaces. To make a program you can use e.g. an open source package NURBS++ by Philippe Lavoie.

Spline formulae standartization

I'm not a spline expert (I'm only too curious :) Unfortunately I've never seen the standard deBoor textbook. I used information from the Net but different sources have different spline formula notation (and different misprints?). I wouldn't like to mislead users and will try to "sinchronize" cited formulae and Java sources (but it proves almost nothing :) Write me if you have any remarks or suggestions.

Contents   Previous: Bezier spline curves   Next: Interpolating Lagrange curve
updated 7 August 2001