Transformations II
CS5600 Computer Graphics
Rich Riesenfeld
Spring 2005
Lect
ure
Set
7
Spring 2005 Utah School of Computing 2Student Name ServerStudent Name Server
Arbitrary 3D Rotation
• What is its inverse?
• What is its transpose?
• Can we constructively elucidate this
relationship?
Spring 2005 Utah School of Computing 3Student Name ServerStudent Name Server
Want to rotate about arbitrary axis a
a
)(: Ra
x
z
y
3
Spring 2005 Utah School of Computing 4Student Name ServerStudent Name Server
First rotate about z by
( ): Rz
a Now in the
(y-z)-plane
x
z
y
Spring 2005 Utah School of Computing 5Student Name ServerStudent Name Server
Then rotate about x by
x
z
y
( ): Rx
Rotate in the
(y-z)-plane
a
)(: Raxisz zNow perform rotation about
x
z
y
aNow a-axis aligned
with z-axis
6
Spring 2005 Utah School of Computing 7Student Name ServerStudent Name Server
Then rotate about x by ( ): Rx
Rotate again in the (y-z)-plane
x
z
y
a
Spring 2005 Utah School of Computing 8Student Name ServerStudent Name Server
Then rotate about z by ( ): Rz
Now to original position of a
a
x
z
y
Spring 2005 Utah School of Computing 9Student Name ServerStudent Name Server
We effected a rotation by about arbitrary axis a
a
)(: Ra
x
z
y
9
Spring 2005 Utah School of Computing 10Student Name ServerStudent Name Server
We effected a rotation by about arbitrary axis a )(: Ra
10
)()()( RRR z xa)( Rz
)()( RRx z
Spring 2005 Utah School of Computing 11Student Name ServerStudent Name Server
Rotation about arbitrary axis a
• Rotation about a-axis can be effected by a composition of 5 elementary rotations
• We show arbitrary rotation as succession of 5 rotations about principal axes
Spring 2005 Utah School of Computing 12Student Name ServerStudent Name Server
)( Ra
cos( ) sin( ) 0 0 1 0 0 0
sin( ) cos( ) 0 0 0 cos( ) sin( ) 0
0 0 1 0 0 sin( ) cos( ) 0
0 0 0 1 0 0 0 1
( )Ra
1000010000cossin00sincos
1000
0cossin0
0sincos00001
1000010000cossin00sincos
)( Rz
In matrix terms, )( Rz
)( Rx
)( Rx
)( Rz
Spring 2005 Utah School of Computing 13Student Name ServerStudent Name Server
cos( ) sin( ) 0 0 1 0 0 0
sin( ) cos( ) 0 0 0 cos( ) sin( ) 0
0 0 1 0 0 sin( ) cos( ) 0
0 0 0 1 0 0 0 1
( )Ra
,)()(1 RaRa
1000010000cossin00sincos
1000
0cossin0
0sincos00001
1000010000cossin00sincos
)( Rz
Similarly, so,
Spring 2005 Utah School of Computing 14Student Name ServerStudent Name Server
Recall, tAtBtAB
RtMtRtA
tttt RRMt
RMR .
Consequently, for , RMtRA
because,
RMR tt
Spring 2005 Utah School of Computing 15Student Name ServerStudent Name Server
RStMtStRt
RSMtStR
It follows directly that,
Spring 2005 Utah School of Computing 16Student Name ServerStudent Name Server
)()(1 RtaRa
)( Rtz
1000
0)cos()sin(0
0)sin()cos(00001
10000100
00)cos()sin(
00)sin()cos(
)(
Ra
1000010000cossin00sincos
1000
0cossin0
0sincos00001
1000010000cossin00sincos
Spring 2005 Utah School of Computing 17Student Name ServerStudent Name Server
)()( 1 RtaRa
Constructively, we have shown,
This will be useful later
Spring 2005 Utah School of Computing 30Student Name ServerStudent Name Server
What is “Perspective?”
• A mechanism for portraying 3D in 2D
• “True Perspective” corresponds to
projection onto a plane
• “True Perspective” corresponds to an
ideal camera image
Spring 2005 Utah School of Computing 31Student Name ServerStudent Name Server
Differert Perspectives Used
• Mechanical Engineering
• Cartography
• Art
Spring 2005 Utah School of Computing 32Student Name ServerStudent Name Server
Perspective in Art
• “Naïve” (wrong)
• Egyptian
• Cubist (unrealistic)
• Esher
– Impossible (exploits local property)
– Hyperpolic (non-planar)
– etc
Spring 2005 Utah School of Computing 33Student Name ServerStudent Name Server
“True” Perspective in 2Dy
x
(x,y)
p
h
Spring 2005 Utah School of Computing 34Student Name ServerStudent Name Server
“True” Perspective in 2D
pxpyh
pxy
ph
Spring 2005 Utah School of Computing 35Student Name ServerStudent Name Server
“True” Perspective in 2D
px
py
px
px
px
py
px
px
p
pxpx
y
x
y
x
11
This is right answer for screen projection
Spring 2005 Utah School of Computing 36Student Name ServerStudent Name Server
“True” Perspective in 2D
1 1
1
1 0 0
0 1 0
0 1 1px
x
xp p
pyx p
x
p
pp
x x
y y
x
y
Spring 2005 Utah School of Computing 63Student Name ServerStudent Name Server
Perspective in Art
• Naïve (wrong)
• Egyptian
• Cubist (unrealistic)
• Esher
• Miro
• Matisse
Spring 2005 Utah School of Computing 64Student Name ServerStudent Name Server
Egyptian Frontalism
• Head profile
• Body front
• Eyes full
• Rigid style
Uccello's (1392-1475) hand drawing was the first extant complex geometrical form rendered according to the laws of linear perspective
Perspective Study of a Chalice, Drawing, Gabinetto dei Disegni, Uffizi, Florence, ca 1430)
65
Spring 2005 Utah School of Computing 66Student Name ServerStudent Name Server
Perspective in Cubism
Woman with a Guitar (1913) G
eorg
es B
raqu
e
Spring 2005 Utah School of Computing 67Student Name ServerStudent Name Server
Perspective in Cubism
Madre con niño muerto (1937)
68
Pablo P
icaso
Pablo Picaso, Cabeza de mujer llorando con pañuelo
69
Spring 2005 Utah School of Computing 70Student Name ServerStudent Name Server
Perspective (Mural) Games
M C Esher, Another World II
(1947)
Spring 2005 Utah School of Computing 71Student Name ServerStudent Name Server
PerspectiveAscending and Descending (1960)
M C
Escher
Spring 2005 Utah School of Computing 72Student Name ServerStudent Name Server
M. C. Escher
M C Escher, Ascending and Descending (1960)
Spring 2005 Utah School of Computing 73Student Name ServerStudent Name Server
M C Escher
• Perspective is “local”• Perspective consistency is not
“transitive”
• Nonplanar (hyperbolic)
projection
Spring 2005 Utah School of Computing 74Student Name ServerStudent Name Server
Nonplanar (Hyperbolic) Projection
M C Esher, Heaven and Hell
Spring 2005 Utah School of Computing 75Student Name ServerStudent Name Server
Nonplanar (Hyperbolic) Projection
M C Esher, Heaven and
Hell
Spring 2005 Utah School of Computing 76Student Name ServerStudent Name Server
David McAllister
The March of Progress,
(1995)
Spring 2005 Utah School of Computing 77Student Name ServerStudent Name Server
Joan Miro: Flat Perspective
The Tilled Field
What cues are missing?
Henri Matisse, La Lecon de
Musique
Flat Perspective: What cues are
missing?
78
Spring 2005 Utah School of Computing 79Student Name ServerStudent Name Server
Next 2 Images Contain Nudity !
Henri Matisse, Danse (1909)80
Henri Matisse, Danse II (1910)81
Spring 2005 Utah School of Computing 82Student Name ServerStudent Name Server
Atlas Projection
Spring 2005 Utah School of Computing 83Student Name ServerStudent Name Server
Norway is at High Latitude
There is considerable size distortion
Spring 2005 Utah School of Computing 84Student Name ServerStudent Name Server
Isometric View
Spring 2005 Utah School of Computing 85Student Name ServerStudent Name Server
Engineering Drawing: 2 Planes
AA
AA
Section AA
Engineering Drawing: Exploded
View
Understanding 3D Assembly
in a 2D Medium 86
Spring 2005 Utah School of Computing 87Student Name ServerStudent Name Server
“True” Perspective in 2Dy
x
(x,y)
p
h
Spring 2005 Utah School of Computing 88Student Name ServerStudent Name Server
“True” Perspective in 2D
pxpyh
pxy
ph
Spring 2005 Utah School of Computing 89Student Name ServerStudent Name Server
“True” Perspective in 2D
1
1
1
1 0 0
0 1 0
0 1 1 xp p
pyx p
pxx p
x pp
px
x p
py
x p
x x
y y
x
y
Spring 2005 Utah School of Computing 90Student Name ServerStudent Name Server
Geometry is Same for Eye at Originy
x
(x,y)
p
h
Screen Plane
Spring 2005 Utah School of Computing 91Student Name ServerStudent Name Server
What Happens to Special Points?
What is this point??
1
1 0 0
0 1 0
0 1 1 0
0 0
p
p p
Spring 2005 Utah School of Computing 92Student Name ServerStudent Name Server
Let’s Look at Limit
1
1lim 0 0
01
n
nn
n
We see that
Observe,
on -axis0
nx
Spring 2005 Utah School of Computing 93Student Name ServerStudent Name Server
Where does Eye Point Go?
• It gets sent to on x-axis
• Where does on x-axis go?
Spring 2005 Utah School of Computing 94Student Name ServerStudent Name Server
What happens to ?
1 1
1 11 0 0
0 1 0
0 1 10
0 0 00
p p
p p
It comes back to virtual eye point!
Spring 2005 Utah School of Computing 95Student Name ServerStudent Name Server
What Does This Mean?
x
y
p
Spring 2005 Utah School of Computing 96Student Name ServerStudent Name Server
What Does This Mean?y
p
x
Spring 2005 Utah School of Computing 97Student Name ServerStudent Name Server
The “Pencil of Lines” Becomes Parallel
y
x
Spring 2005 Utah School of Computing 98Student Name ServerStudent Name Server
Parallel Lines Become “Pencil of Lines” !
x
y
Spring 2005 Utah School of Computing 99Student Name ServerStudent Name Server
Parallel Lines Become “Pencil of Lines” !
x
y
Spring 2005 Utah School of Computing 100Student Name ServerStudent Name Server
What Does This Mean?
x
y
p
Spring 2005 Utah School of Computing 101Student Name ServerStudent Name Server
“True” Perspective in 2Dy
p
Spring 2005 Utah School of Computing 102Student Name ServerStudent Name Server
“True” Perspective in 2Dy
p
p
p
p
p
p
p
p
Spring 2005 Utah School of Computing 103Student Name ServerStudent Name Server
Viewing Frustum
Spring 2005 Utah School of Computing 104Student Name ServerStudent Name Server
What happens for large p?”
1 0 01 0 0
0 1 0 0 1 0
0 1 0 1
1
1 01 1
lim 0
p
p
x x
y y
p
Spring 2005 Utah School of Computing 105Student Name ServerStudent Name Server
Projection Becomes Orthogonal: “Right Thing Happens”
x
(x,y)
h=y
p
The End
Transformations II
Lect
ure
Set
7