Tải bản đầy đủ (.pdf) (14 trang)

the differential geometry of parametric primitives

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (51.32 KB, 14 trang )

THE DIFFERENTIAL GEOMETRY OF PARAMETRIC PRIMITIVES
Ken Turkowski
Media Technologies: Graphics Software
Advanced Technology Group
Apple Computer, Inc.
(Draft Friday, May 18, 1990)
Abstract: We derive the expressions for first and second
derivatives, normal, metric matrix and curvature matrix for
spheres, cones, cylinders, and tori.
26 January 1990
Apple Technical Report No. KT-23
The Differential Geometry of Parametric Primitives
Ken Turkowski
26 January 1990
Differential Properties of Parametric Surfaces
A parametric surface is a function:
where
is a point in affine 3-space, and
is a point in affine 2-space.
The Jacobian matrix is a matrix of partial derivatives that relate changes in u and v to changes in
x, y, and z:
The Hessian is a tensor of second partial derivatives:
The first fundamental form is defined as:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 1

G = JJ
t
=
∂ x
∂ u



∂ x
∂u
∂x
∂u

∂ x
∂v
∂ x
∂v

∂ x
∂u
∂x
∂ v

∂ x
∂v











H =


2
x, y,z
(
)
∂ u, v
(
)
∂ u,v
(
)
=

2
x
∂u
2

2
y
∂u
2

2
z
∂u
2








2
x
∂u∂v

2
y
∂u∂v

2
z
∂u∂v







2
x
∂v∂u

2
y
∂ v∂u


2
z
∂ v∂u







2
x
∂ v
2

2
y
∂ v
2

2
z
∂v
2



















=

2
x
∂u
2

2
x
∂u∂v

2
x
∂v∂u

2
x
∂v

2













J =
∂ x,y,z
(
)
∂ u,v
(
)
=

x
∂ u
∂ y
∂ u
∂ z
∂ u
∂ x

∂ v
∂ y
∂ v
∂ z
∂ v










=
∂x
∂u
∂x
∂v












u = u v
[
]

x = x y z
[
]

x = F u
(
)
and establishes a metric of differential length:
so that the arc length of a curve segment, is given by:
The differential surface area enclosed by the differential parallelogram is approximately:
so that the area of a region of the surface corresponding to a region R in the u-v plane is:
The second fundamental matrix measures normal curvature, and is given by:
The normal curvature is defined to be positive a curve u on the surface turns toward the positive
direction of the surface normal by:
The deviation (in the normal direction) from the tangent plane of the surface, given a differential
displacement of is:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 2

˙˙
x • n =
˙
uD
˙
u

t

˙
u

κ
n
=
˙
uD
˙
u
t
˙
uG
˙
u
t

D = n• H =
n•

2
x
∂u
2
n •

2
x

∂u∂v
n •

2
x
∂ v∂u
n •

2
x
∂v
2













S = G
(
)
R
∫∫

1
2
dudv

δ S≈ G
(
)
1
2
δ uδv

δu,δv
(
)

s =
ds
dt
t
0
t
1

dt =
˙
x
t
0
t
1


dt =
˙
x
t
0
t
1

dt =
˙
uG
˙
u
t
(
)
t
0
t
1

1
2
dt

u = u t
(
)
,

t
0
< t < t
1

dx
(
)
2
= du
(
)
G du
(
)
t
Reparametrization
If the parametrization of the surface is transformed by the equations:
then the chain rule yields:
or
where
is the new Jacobian matrix of the surface with respect to the new parameters and , and
is the Jacobian matrix of the reparametrization.
The new Hessian is given by
where
.
The new fundamental matrix is given by:
and the new curvature matrix is given by:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 3


′D = PDP
T

′G = PGP
T

Q =
∂ u,v
(
)
∂ ′u
2

u,v
(
)
∂ ′u ∂ ′v
∂ u,v
(
)
∂ ′v ∂ ′u
∂ u,v
(
)
∂ ′v
2












′H = PHP
T
+QJ

P =
∂ u,v
(
)
∂ ′u , ′v
(
)
=

u
∂ ′u
∂v
∂ ′u
∂u
∂ ′v
∂v
∂ ′v












′v

′u

′J =
∂ x, y,z
(
)
∂ ′u , ′v
(
)

′J = PJ

∂ x,y,z
(
)
∂ ′u , ′v
(
)

=

u,v
(
)
∂ ′u , ′v
(
)

x,y,z
(
)
∂ u,v
(
)

′u = ′u u,v
(
)
and ′
v = ′v u,v
(
)
Change of Coordinates
For simplicity, we have defined several primitives with unit size, located at the origin. Related
to the reparametrization is the change of coordinates , with associated Jacobian:
When the change of coordinates is represented by the affine transformation:
the Jacobian is simply the submatrix:
Regardless, the Jacobian and Hessian transform as follows:
The normal is transformed as:

The denominator arises from the desire to have a unit normal.
The first and second fundamental matrices are then calculated as:
Not very pretty. But certain types of transformations can be applied easily. For a uniform scale
with arbitrary translations,
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 4

C =
r 0 0
0 r 0
0 0 r










= r I

′D = ′H • ′n =
HC
(
)
• nC
−1t
(

)
nC
−1t
C
−1
n
t
(
)
1
2
=
HCC
−1
n
t
nC
−1t
C
−1
n
t
(
)
1
2
=
H •n
nC
−1t

C
−1
n
t
(
)
1
2
=
D
nC
−1t
C
−1
n
t
(
)
1
2

′G = ′J ′J
t
= JCC
t
J
t

′n =
nC

−1t
nC
−1t
C
−1
n
t
(
)
1
2

′J = JC, ′H = HC

C =
x
x
y
x
z
x
x
y
y
y
z
y
x
z
y

z
z
z











A =
x
x
y
x
z
x
x
y
y
y
z
y
x
z
y

z
z
z
x
o
y
o
z
o













C =
∂ ′x
∂ x
=
∂ ′x
∂ x
∂ ′y
∂ x

∂ ′z
∂ x
∂ ′x
∂ y
∂ ′y
∂ y
∂ ′z
∂ y
∂ ′x
∂ z
∂ ′y
∂ z
∂ ′z
∂ z


















′x = ′x x
(
)
so that
For rotations (and arbitrary translations), the Jacobian matrix C=R is orthogonal, so the inverse
is equal to the transpose, yielding:
Combining the two, we have the results for a transformation that includes translations, rotations
and uniform scale:
or in terms of the composite matrix :
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 5

′J = JC, ′H = HC, ′n =
nC
C
(
)
1
3
, ′G = C
(
)
2
3
G, ′D = C
(
)
1
3

D

C = r R

′J = rJR, ′H = rHR, ′n = nR, ′G = r
2
G, ′D = rD

′J = JR, ′H = HR, ′n = nR, ′G = G, ′D =D

′J = rJ, ′H = rH, ′n = n, ′G = r
2
G, ′D = r D
Sphere
Given the spherical coordinates:
we have the Jacobian matrix:
the Hessian tensor:
the first fundamental form:
the normal:
and the second fundamental form:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 6

D =

x
2
+ y
2
r

0
0 −r









n =
x
r
y
r
z
r







G =
x
2
+ y
2

0
0 r
2








2
x, y,z
(
)
∂ θ,φ
(
)
∂ θ ,φ
(
)
=
− x −y 0
[
]

yz
x
2
+ y

2
xz
x
2
+ y
2
0







yz
x
2
+ y
2
xz
x
2
+ y
2
0






 − x −y −z
[
]















∂ x,y,z
(
)
∂ θ ,φ
(
)
=

y x 0
xz
x
2

+ y
2
yz
x
2
+ y
2
− x
2
+ y
2









x y z
[
]
=
r sinφ cosθ r sin φ sinθ r cosφ
[
]
Unit Sphere
Angle Parametrization
Given the unit spherical coordinates with , we parametrize the sphere:

This yields the Jacobian matrix:
the Hessian tensor:
the first fundamental form:
the normal:
and the second fundamental form:
Angle Parametrization
With the reparametrization , we have the Jacobian:
Applying the chain rule, we have:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 7

J
uv
=
−2π y 2π x 0
πxz
x
2
+ y
2
πyz
x
2
+ y
2
−π x
2
+ y
2










P =
2π 0
0 π







θ = 2π u, ϕ = πv

D
θφ
=
− x
2
+ y
2
(
)
0

0 −1







n = x y z
[
]

G
θφ
=
x
2
+ y
2
0
0 1







H
θφ

=
− x −y 0
[
]

yz
x
2
+ y
2
xz
x
2
+ y
2
0







yz
x
2
+ y
2
xz
x

2
+ y
2
0





 − x −y −z
[
]















J
θφ
=

− y x 0
xz
x
2
+ y
2
yz
x
2
+ y
2
− x
2
+ y
2









x y z
[
]
= sin φ cosθ sin φ sinθ cosφ
[
]


0 ≤ θ < 2π, 0 ≤ ϕ < π
Changing coordinates to yield a sphere of arbitrary radius, we find that the expressions for the
Jacobian, the Hessian, and the metric matrix remain the same, because x, y, and z scale linearly
with r. The curvature matrix changes to:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 8

D
uv
=


2
x
2
+ y
2
(
)
r
0
0 −π
2
r










D
uv
=
−4π
2
x
2
+ y
2
(
)
0
0 −π
2







G
uv
=

2

x
2
+ y
2
(
)
0
0 π
2







H
uv
=

2
−x −y 0
[
]
2π −
yz
x
2
+ y
2

xz
x
2
+ y
2
0






2π −
yz
x
2
+ y
2
xz
x
2
+ y
2
0





 π

2
− x −y −z
[
]














Cone
Angle Parametrization
Given the unit conical parametrization:
we have the Jacobian matrix:
the Hessian tensor:
the first fundamental form:
the normal:
and the second fundamental form:
Unit Parametrization
For the parametrization:
we have:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990

Apple Computer, Inc. Media Technology: Computer Graphics Page 9

H
uv
=

2
−x −y 0
[
]

h
rz
−y x 0
[
]
2π h
rz
−y x 0
[
]
0 0 0
[
]












J
uv
=
−2π y 2π x 0
hx
rz
hy
rz
h









x y z
[
]
=
rvcos2 π u rv sin2 πu vh
[
]


D
θ z
=

z
2
0
0 0









n
θz
=
x
z 2
y
z 2

1
2








G
θ z
=
x
2
+ y
2
0
0
x
2
+ y
2
+ z
2
z
2









=
z
2
0
0 2







H
θ z
=
−x −y 0
[
]

y
z
x
z
0








y
z
x
z
0






0 0 0
[
]











J
θ z
=
− y x 0

x
z
y
z
1









x y z
[
]
=
zcosθ zsinθ z
[
]
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 10

D
uv
=


2

rz
1 + h
2
0
0 0









n
uv
=
1
1+ h
2
h
2
x
rz
h
2
y
rz
−1








G
uv
=

2
x
2
+ y
2
(
)
0
0
h
2
x
2
+ y
2
+ z
2
(
)
z

2










Cylinder
Angle Parametrization
Given the cylindrical parametrization:
we have the Jacobian matrix:
the Hessian tensor:
the first fundamental form:
the normal:
and the second fundamental form:
Unit Parametrization
With the parametrization:
we have the Jacobian matrix:
the Hessian tensor:
the first fundamental form:
the normal:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 11

G
uv

=

2
r
2
0
0 h
2







H
uv
=
−4π
2
x −4π
2
y 0
[
]
0 0 0
[
]
0 0 0
[

]
0 0 0
[
]







J
uv
=
−2π y 2π x 0
0 0 h







x y z
[
]
=
r cos2 π u r sin2πu hv
[
]


D
θφ
=
−1 0
0 0







n = x y 0
[
]

G
θφ
=
1 0
0 1







H

θφ
=
− x −y 0
[
]
0 0 0
[
]
0 0 0
[
]
0 0 0
[
]







J
θφ
=
− y x 0
0 0 1








x y z
[
]
= cosθ sinθ
z
[
]
and the second fundamental form:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 12

D
uv
=
−4π
2
r 0
0 0







n =
x

r
y
r
0






Torus
Angle Parametrization
Given the torus parametrization:
we have the Jacobian matrix:
the Hessian tensor:

the first fundamental form:
the normal:
and the second fundamental form:
using the torus’s implicit equation:
Turkowski The Differential Geometry of Parametric Primitives 26 January 1990
Apple Computer, Inc. Media Technology: Computer Graphics Page 13

x
2
+ y
2
− R
(
)

2
+ z
2
= r
2

D
θφ
=

x
2
+ y
2
r
1 −
R
x
2
+ y
2






0
0 −r











=
R
2
− x
2
− y
2
+ z
2
− r
2
2r
0
0 −r










n = x
1 −
R
x
2
+ y
2
r
y
1 −
R
x
2
+ y
2
r
z
r














G
θφ
=
x
2
+ y
2
0
0 r
2







H
θφ
=
− x −y 0
[
]
yz
x
2
+ y

2

xz
x
2
+ y
2
0






yz
x
2
+ y
2

xz
x
2
+ y
2
0






 − x 1−
R
x
2
+ y
2





 − y 1 −
R
x
2
+ y
2





 −z
























J
θφ
=
− y x 0

xz
x
2
+ y
2

yz
x

2
+ y
2
x
2
+ y
2
− R









x y z
[
]
= R+ r cosφ
(
)
cosθ R+ r cosφ
(
)
sin θ r sin φ
[
]

×