Splines: Representations of 2D and 3D Curved Surfaces

Introduction

There are two general problems with curved surfaces:

1. May have a curve ( or surface ) with a few known points and want to interpolate between them. For example an energy surface in Physics or Chemistry or measured data in business. Each computed point is very expensive, or else it might be a face, car, etc. witha few digitized points. We could do straight line interpolation, but a better method is curve interpolation.

2. We may want to synthesize a curve or a surface, for example in designing an automobile. Then let designer specify a set of control points (Knots) which define the curve/surface. The computer then computes and displays the curve. As the designer modifies the control points the curve changes.

Splines: General Discussion

1.Hermite (Ferguson) - defines positions and tangents at end points

2.Bezier - defines the positions of the curves' end points and uses 2 other points (usually not on the curve) to indirectly define the tangents at the end points

3.B-Spline - approximates end points rather than matching them


Bezier

Look at Bezier curves (developed for designing Renault auto bodies).

Bezier curves use 4 input points with the tangent vectors at the end points being determined by line segments e.g. the line segment from P1 ® P2

Therefore: Relationship between Hermite Geometry matrix, GH and Beezier geometry matrix GB is

éP1 ù é 1 0 0 0 ù éP1ù

GH = êP4 ê = ê 0 0 0 1 ú êP4ú = MHB GB

êR1ú ê -3 3 0 0 ú êP3ú

ëR4û ë 0 0 -3 3 û ëP4û

ß ß

MHB GB

Putting this back into our eqn. for Hermite coordinates we get

x(t) = TMHGHx = TMHMHBGBx

Let Mb = Mh * Mhb then we have Bezier form x(t) = TMbGbx with:

é -1 3 -3 1 ù

MB = ê 3 -6 3 1 ú

ê -3 3 0 0 ú

ë 1 0 0 0 û

So we have equation for x(t) (with similar equation for y(t), z(t)). As with hermite case multiply multiply T with Mb and get:

TMb = [(-t3 + 3t2 - 3t + 1) (3t3 - 6t2 + 3t) (-3t3 + 3t2)(t3)]

Post Multiply by Gb and get :

x(t) = P1x(-t3 + 3t2 - 3t + 1) +

P2x(3t3 - 6t2 + 3t) + ¬ Bezier blending functions

P3x(-3t3 + 3t2) +

P4x(t3)

We can derive similar equations for y and z. Note: Bezier curves (unlike Hermite curves) have a bounding convex hull, defined by the control points. Also for curve segments have C(1) continuity only if P3, P4, P5 (etc.) are colinear

B-Spline

The curve does not neccessarily pass through any control point but is C(0), C(1), C(2) continuous at end points. Therefore, B-Spline is "smoother" than either Hermiter or Bezier forms.

as before : x(t) = TMSG Sx with Ms as below:

é -1 3 -3 1 ù

MS = 1/6 ê 3 -6 3 0 ú

ê -3 0 3 0 ú

ë 1 4 1 0 û

TMS = 1/6 [(-t3 + 3t2 - 3t +1)(+3t3 - 6t2 + 4)(-3t3 + 3t2 + 3t +1)(t3)]

Note: for t = 0 TMS = 1/6 [(1)(4)(1)(0)] so not determined by any single point

t = 1 TMS = 1/6 [(0)(1)(4)(1)]

For B-Spline we use a different Geometry matrix between each pair of adjacent points.

That is:

Gsx = Gsxi = |Pi-1|

|Pi |

|Pi+1|

|Pi+2|

Proof that B-splines are C(0), C(1), and C(2) continuous

{for Point i}

Look at C(1), C(2) continuity for GSx = GSxi at t =1

xi(1) = (xi + 4xi+1 + xi+2)/6

d(TMS)/dt = 1/6[(-3t2 + 6t - 3) (9t2-12t) (-9t2 +6t +3) (3t2)]

d2(TMS)/dt2 = 1/6[(-6t + 6) (18t -12) (-18t + 6) (6t)]

so dxi /dt|t=1 = (-3xi + 3xi+2)/6 = (-xi + xi+2)/2

d2xi /dt|t=1 = (6xi - 12xi+1 + 6xi+2 )/6

= xi - 2xi+1 + xi+2

Now repeat Process for next Point, i.e. GSx = GSxi+1 and evaluate at t = 0

xi+1(0) = 1/6[(1)(4)(1)(0)] Pi+1x

= 1/6(xi + 4xi+1 + xi+2)

dxi+1/dt|t=0 = 1/6[((-3)(0)(+3)(0))]Pi+1x

= (-xi + xi+2 )/2

d2x i+1 /dt| t=0 = xi - 2xi+1 + xi+2

therefore, C(0), C(1), C(2) continuous

:

Click here for program execution illustrating Splines

Parametric Bicubic Surfaces

They are defined by 2 Parameters s,t. So, use control points in 2 directions, i.e., just use a double loop.

Look at 2 Hermite surfaces and code to generate them.


Modeling in Computer Graphics
HyperGraph Table of Contents.
HyperGraph Home page.

Last changed February 09, 1997, G. Scott Owen, owen@siggraph.org