Parametric Cubic Curves

This applet shows different parametric cubic curves, Hermite, Bézier, B-Splines and Catmull-Rom Splines. You can choose which curve to show with the buttons under the applet and reset the applet with the reset button.

All control points (red points) can be clicked on and dragged to alter the curves appearance. No other points will react on dragging.



Source for the curves

There is not a big visual difference between the Hermite and the Bézier curves, but Hermite curves use the tangent vector of the endpoint as a geometric constraint of the curve whereas Bézier uses another point relative the origin as constraint.

The B-Spline, which is a uniform nonrational B-Spline, consists of several curve segments. Each segment is controlled by four control points, for example: the segment t5-t6 is controlled by the control points P2, P3, P4 and P5. Or, vice versa, control point Pi affects knot points ti, ti+1, ti+2 and therefore the segments ti-1 -> ti, ti -> ti+1, ti+1 -> ti+2, ti+2 -> ti+3. All segments are totally unaffected by movement of any other control points. This makes splines suitable for curves consisting of large amount of points since only the four segments that is affected by a point has to be recalculated when a control point is moved.

The Catmull-Rom Spline has its control points on the curve and might be more suitable when one wants to connect several points with a smooth curve. Also here, each control point only affects four curve segments, namely the two segments on each side of the control point.


By Mattias Mattsson