Cubic Surfaces
description
Transcript of Cubic Surfaces
Cubic Surfaces CGP&P Chapter 11
Modeling surfaces
Extension of parametric cubic curves called “parametric bicubic surfaces”
Idea: infinite # of curves stacked together equations now have 2 parameters Q(s,t)
P1(t)P4(t)
t
s
t=0.25
t=0.75
Matrix representation
A single curve was expressedQ(t) = TMG
Now, the geometric information varies
Q(s,t) = SMG
)(
)(
)(
)(
4
3
2
1
tG
tG
tG
tG
G each Gi(t) is itselfa cubic curve
Matrix representation (cont.)
Since each Gi is a cubic curve, it can be written:
Gi(t) = TMGi
4
3
2
1
i
i
i
i
i
g
g
g
g
G
Matrix representation (cont.)
Substituting, we obtain:
Q(s,t) = SM
= SMTM
4
3
2
1
TMG
TMG
TMG
TMG
4
3
2
1
G
G
G
G
This formulation does not work in terms of matrix dimensions...
Matrix representation (cont.)
So, use the transpose rule:Gi(t) = Gi
T MT TT
Q(s,t) = S M MT TT
= S M MT TT
T
T
T
T
G
G
G
G
4
3
2
1
44434241
34333231
24232221
14131211
gggg
gggg
gggg
gggg
Matrix representation (cont.) Finally, remember that the large
geometry matrix has 3 components (x, y, z) for each gij, so that we get three parametric equations:
x(s,t) = S M Gx MT TT
y(s,t) = S M Gy MT TT
z(s,t) = S M Gz MT TT
Hermite surfaces extension of Hermite curves to
parametric bicubic surfaces four elements of the geometry
matrix are now P1(t), P4(t), R1(t), R4(t)
can be thought of as interpolating the curves Q(s,0) and Q(s,1) orQ(0,t) and Q(1,t)
Hermite surface matrices
x(s,t) = S M GHx MT TT
y(s,t) = S M GHy MT TT
z(s,t) = S M GHz MT TT
44434241
34333231
24232221
14131211
gggg
gggg
gggg
gggg
GxH
P1x (t) TMG1x
G1x
g11
g12
g13
g14
Hermite Surface Matrix
Upper left = x-coordinates of surface Upper right = x derivatives in t at corners Lower left = x derivatives in s at corners Lower right = twist at corners
Rendering surfaces Can use iterative methods in s and t
Solve surface at points Q(s, t) and connect points with quadrilaterals
Expensive because iterating for small s and t results in many cubic surface evaluations
Forward Differencing Our old friend… Because we can differentiate cubic curves
three times, we can increment all derivatives x += x x += 2x 2x += 3x
Surface Rendering Subdivision
As with cubic curves, Bezier cubic surface easily supports subdivision
Subdivision ceases when plane described by one quarter of the surface is nearly coplanar with the other three-fourths
Watch for abutting quadrilaterals that don’t match up
This happens when different levels of subdivision are applied to adjoining patches