Unformatted text preview: ol points Calculating a CubicCubic Spline Patch
Calculating a Spline Patch
Calculating Calculating a Cubic Spline Patch
a Cubic Spline Patch"
Each patch has thehas the P = !a3 µ3= aa2 µ2+ aa1 µ + a0 µ + a
Each patch the form:
• Each patch hasform:form: P + µ3 + µ2 + a
3 2 1
3 0 Each patch has the form: P = a3 µ + a2 µ2 + a1 µ + a0
For theFor the which joins points points P iand we have have
patch patch which joins Pi and P +1 , P , we
i
i
• I the patch which joins points Pi and Pi+1+1 have !
For
, we
µ = I at = i at P the patch which joins points Pi and Pi+1 , we have
0 µ P 0 For
i
I µ = I at Pi+1
1 µ = 1 at P µ = 0 at Pi
I +1
i
µ = 1 at Pi+1
Substituting these values values we get
Substituting these we get
• Substituting these values we get !
Substituting these values we get
I Pi = Pi 0 = a0
a
Pi+1 Pi+1 3 = a2 3 + 1i2 + 0 1 a0 a0
= a + a+ a a+ =a +
Pa Pi+1 = a3 + a2 + a1 + a0
Graphics Lecture 11: Slide 17!
17 / 38 17 / Calculating a Cubic Spline Patch
Calculating a Cubic Spline Patch
Calculating a Cubic Spline Patch Calculating a Cubic Spline Patch"
Di ↵erentiating P = P3=3a µ32 +2a µ21+ + a0+ a get eget !
Di↵erentiating a µ + a µ + a µ a a0 we get
•↵Differentiating a3 µ!3 + a2 µ2 + a1 µ + 1 µ we 0 we get
!2!
!
w
3
Di erentiating P =
P00 =P0 a3 µ2a+µ2a2 µ a a1+ a
3 = 32 2 + 2 + µ
3
1
P = 3 a3 µ + 2 a2 µ +2a1
Substituting µ = 0 at 0 i and µ = 1 at 1 i+1Pwe , we get†
Pat P and µ = Pat ,
get††
Substituting µ µ
i+1
Substituting µ = for= Pi 0 at iPi =ndat = i1 a,t we get e get!
• Substituting 0 at = and µ a 1 µ P +1 Pi+1 w
P00 P0
i=
i
P
0i =
P0i+1P0=
i+1
P
=
i+1 †
Graphics Lecture 11: Slide 18!
Remember that P’s
† † a1 a
a= 1
1
3 a3 +a a2 +a 1+ a
= + 23a++ a2
32 2a
1
3a
3 2 and a’s are all vectors
Remember that P’s and a’s are all vectors
Remember that P’s and a’s are all vectors 1 18 / 38 18 / 38 18 / 38 Calculating a Cubic Spline Patch Calculating a Cubic Spline Patch"
• Putting these equations into matrix form we get:
Putting these four four equations into matrix form we get:!
0 1
B0
B
@1
0 0
1
1
1 0
0
1
2 0
0
1
3 10 1 0
1
a0
Pi
C Ba1 C B P0 C
CB C = B i C
A @a2 A @Pi+1 A
a3
P0 +1
i TheThe initial matrix is always the whether the points Ppoints P
• initial matrix is always the same same whether the are in
2Daor in 3D or in 3D !
re in 2D !
Graphics Lecture 11: Slide 19!
19 / 38 Calculating a Cubic Spline Patch" Calculating a Cubic Spline Patch • Finally, inverting the matrix gives us the values of a0, . . . ,
Finally, inverting the matrix gives us the values of a0 , . . . , a3 that
a3 that we want !
we want 0 1 0 a0
B a1 C B
B
CB
@ a2 A = @
a3 1
0
3
2 0
1
2
1 0
0
3
2 • Notice that matrix is is same
Notice that thethe matrixthe the same !
– for every patch!
I for every patch
– whether the data are 2D, 3D, ... !
I whether the data are 2D, 3D, ... Graphics Lecture 11: Slide 20!
. 10 1 0
Pi
0 C B P0 C
iC
CB
1 A @ Pi+1 A
1
P0 +1
i B...
View
Full
Document
This document was uploaded on 03/26/2014.
 Spring '14

Click to edit the document details