Modeling Curves and Surfaces: G. Drew Kessler (Modified by H.Quynh Dinh 3/2003)
Modeling Curves and Surfaces: G. Drew Kessler (Modified by H.Quynh Dinh 3/2003)
Surfaces
G. Drew Kessler 4
Parametric Curves
Select part of curve: 0 t 1
Linear: Quadratic: Cubic:
ax ay az
b by bz
T t 3
t 2
t 1 C x
cx cy cz
d x dy d z
G. Drew Kessler 6
The Basis Matrix and Geometric Matrix
Q(t) = G M T
m11 m21 m31 m41 t 3
m m 2
G1 G2 G3 G4 12 22 m32 m42
geometry matrix, G.
The basis matrix contains constant values specific to a
family of curves.
G. Drew Kessler 7
Joining Curve Segments Together
G0 geometric continuity: Two curve segments join together
G. Drew Kessler 8
Joining Examples
Join point
C2
C1
C0
TV3
Q3
TV2
TV1
P1 Q2 P3
S joins C0, C1, and C2 with
P2 C0, C1, and C2 continuity,
respectively.
Q1
G. Drew Kessler 10
Blending Function
Blending functions of a curve family are defined by M•T
Set of functions in t
G. Drew Kessler 11
Hermite Curves
Defined by two endpoints and tangents at the endpoints.
R1
P4
R4
P1
G. Drew Kessler 12
Hermite Curve Examples
R1
P4
P1
The set of Hermite curves that have the same values for R4
the endpoints P1 and P4, tangent vectors R1 and R4 of the
same direction, but with different magnitudes for R1. The
magnitude of R4 remains fixed.
G. Drew Kessler 13
Hermite Curve Examples (cont.)
1 3
1 2
P4 Q(1) GH M H R4 Q(1) GH M H
1 1
1 0
G. Drew Kessler 15
Hermite Basis Matrix
0 1 0 3
0 1 0 2
P1 P4 R1 R4 P1 P4 R1 R4 M H
0 1 1 1
1 1 0 0
1
0 1 0 3 2 3 0 1
0 1 0 2 2 3 0 0
MH
0 1 1 1 0 2 1 0
1 1 0 0 1 1 0 0
G. Drew Kessler 16
Hermite Blending Functions
Q(t) = T•MH•GH
Q (t )
f(t)
(2t 3t 1) P1
3 2
1 P1 P4
(2t 3t ) P4
3 2
R1 (t 2t t ) R1
3 2
t
R4 (t 3 t 2 ) R4
G. Drew Kessler 17
Bézier Curves
Curves for four control points, P1, P2, P3, and P4
P3 P2
P4
P1 P1
P4
P2 P3
Convex Hull
G. Drew Kessler 18
Bézier Matrices t 3
2
Q(t) = GB•MB•T t
T
t
• P1 & P4: endpoints 1
• R1 = 3(P2-P1), R4 = 3(P4-P3) 1 3 3 1
3 6 3 0
• constant velocity curves if
control points are equally MB
3 3 0 0
spaced
1 0 0 0
GB P1 P2 P3 P4
G. Drew Kessler 19
Bézier Blending Functions
BB2 BB3
(3t 3t ) P3
3 2
3
1
t
t P4
The Bernstein polynomials:
BB1 (1 t ) 3 BB2 3t (1 t ) 2
BB3 3t 2 (1 t ) BB4 t 3
G. Drew Kessler 20
Bézier Curve Characteristics
1. The functions interpolate the first and last vertex points.
2. The tangent at P1 is given by P2-P1, and the tangent at Pn+1 by Pn+1-
Pn.
3. The blending functions are symmetric with respect to t and (1-t). This
means we can reverse the sequence of vertex points defining the curve
without changing the shape of the curve.
4. The curve, Q(t), lies within the convex hull defined by the control
points.
5. If the first and last vertices coincide, then we produce a closed curve.
6. If complicated curves are to be generated, they can be formed by
piecing together several Bézier sections.
7. By specifying multiple coincident points at a vertex, we pull the curve
in closer and closer to that vertex.
G. Drew Kessler 21
Splines
It’s easy to ensure joins between Hermite or Bézier are G1
or C1 (tangents defined directly), but ensuring C2 is not.
A spline is a curve that is C2 continuous through-out.
point.
Moving one control point changes the entire curve.
is computationally expensive.
G. Drew Kessler 22
B-Splines
A B-Spline defines a curve with m+1 control points, P 0,
P1, ... Pm, m3, which define m-2 connected, cubic
polynomial, curve segments, Q3 to Qm.
The curve segments join at knots, and the endpoints of the
entire curve are also called knots: m-1 knots.
A curve segment Qi is defined by the control points Pi-3, Pi-2,
Pi-1, and Pi.
P9 P8
P1 P3
Q5 P4 Q9
Key feature: moving a control P7
Q8
point has a local effect. Q3 Q6
Q4 Q7 P6
Effects four curve segments.
P0 P5
P2
G. Drew Kessler 23
B-Splines (cont.)
Uniform B-Splines have knots at equal intervals in t.
Distances in t between adjacent knots are the same.
between knots.
Nonuniform Rational B-Splines (NURBS) are commonly
used in 3D modeling systems.
Curves are invariant under perspective transformations.
G. Drew Kessler 24
Surfaces
Can extend parametric cubic curves to a surface.
Parametric bicubic surface
s
Surface defined by 16 coefficients (16 known values).
G. Drew Kessler 25