transformations ii

68
Transformations II CS5600 Computer Graphics Rich Riesenfeld Spring 2005 Lecture Set 7

Upload: nolan-copeland

Post on 31-Dec-2015

33 views

Category:

Documents


0 download

DESCRIPTION

Transformations II. CS5600 Computer Graphics Rich Riesenfeld Spring 2005. Lecture Set 7. Arbitrary 3D Rotation. What is its inverse? What is its transpose? Can we constructively elucidate this relationship?. Want to rotate about arbitrary axis a. 3. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Transformations II

Transformations II

CS5600 Computer Graphics

Rich Riesenfeld

Spring 2005

Lect

ure

Set

7

Page 2: Transformations II

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?

Page 3: Transformations II

Spring 2005 Utah School of Computing 3Student Name ServerStudent Name Server

Want to rotate about arbitrary axis a

a

)(: Ra

x

z

y

3

Page 4: Transformations II

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

Page 5: Transformations II

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

Page 6: Transformations II

)(: Raxisz zNow perform rotation about

x

z

y

aNow a-axis aligned

with z-axis

6

Page 7: Transformations II

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

Page 8: Transformations II

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

Page 9: Transformations II

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

Page 10: Transformations II

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

Page 11: Transformations II

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

Page 12: Transformations II

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

Page 13: Transformations II

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,

Page 14: Transformations II

Spring 2005 Utah School of Computing 14Student Name ServerStudent Name Server

Recall, tAtBtAB

RtMtRtA

tttt RRMt

RMR .

Consequently, for , RMtRA

because,

RMR tt

Page 15: Transformations II

Spring 2005 Utah School of Computing 15Student Name ServerStudent Name Server

RStMtStRt

RSMtStR

It follows directly that,

Page 16: Transformations II

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

Page 17: Transformations II

Spring 2005 Utah School of Computing 17Student Name ServerStudent Name Server

)()( 1 RtaRa

Constructively, we have shown,

This will be useful later

Page 18: Transformations II

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

Page 19: Transformations II

Spring 2005 Utah School of Computing 31Student Name ServerStudent Name Server

Differert Perspectives Used

• Mechanical Engineering

• Cartography

• Art

Page 20: Transformations II

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

Page 21: Transformations II

Spring 2005 Utah School of Computing 33Student Name ServerStudent Name Server

“True” Perspective in 2Dy

x

(x,y)

p

h

Page 22: Transformations II

Spring 2005 Utah School of Computing 34Student Name ServerStudent Name Server

“True” Perspective in 2D

pxpyh

pxy

ph

Page 23: Transformations II

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

Page 24: Transformations II

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

Page 25: Transformations II

Spring 2005 Utah School of Computing 63Student Name ServerStudent Name Server

Perspective in Art

• Naïve (wrong)

• Egyptian

• Cubist (unrealistic)

• Esher

• Miro

• Matisse

Page 26: Transformations II

Spring 2005 Utah School of Computing 64Student Name ServerStudent Name Server

Egyptian Frontalism

• Head profile

• Body front

• Eyes full

• Rigid style

Page 27: Transformations II

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

Page 28: Transformations II

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

Page 29: Transformations II

Spring 2005 Utah School of Computing 67Student Name ServerStudent Name Server

Perspective in Cubism

Page 30: Transformations II

Madre con niño muerto (1937)

68

Pablo P

icaso

Page 31: Transformations II

Pablo Picaso, Cabeza de mujer llorando con pañuelo

69

Page 32: Transformations II

Spring 2005 Utah School of Computing 70Student Name ServerStudent Name Server

Perspective (Mural) Games

M C Esher, Another World II

(1947)

Page 33: Transformations II

Spring 2005 Utah School of Computing 71Student Name ServerStudent Name Server

PerspectiveAscending and Descending (1960)

M C

Escher

Page 34: Transformations II

Spring 2005 Utah School of Computing 72Student Name ServerStudent Name Server

M. C. Escher

M C Escher, Ascending and Descending (1960)

Page 35: Transformations II

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

Page 36: Transformations II

Spring 2005 Utah School of Computing 74Student Name ServerStudent Name Server

Nonplanar (Hyperbolic) Projection

M C Esher, Heaven and Hell

Page 37: Transformations II

Spring 2005 Utah School of Computing 75Student Name ServerStudent Name Server

Nonplanar (Hyperbolic) Projection

M C Esher, Heaven and

Hell

Page 38: Transformations II

Spring 2005 Utah School of Computing 76Student Name ServerStudent Name Server

David McAllister

The March of Progress,

(1995)

Page 39: Transformations II

Spring 2005 Utah School of Computing 77Student Name ServerStudent Name Server

Joan Miro: Flat Perspective

The Tilled Field

What cues are missing?

Page 40: Transformations II

Henri Matisse, La Lecon de

Musique

Flat Perspective: What cues are

missing?

78

Page 41: Transformations II

Spring 2005 Utah School of Computing 79Student Name ServerStudent Name Server

Next 2 Images Contain Nudity !

Page 42: Transformations II

Henri Matisse, Danse (1909)80

Page 43: Transformations II

Henri Matisse, Danse II (1910)81

Page 44: Transformations II

Spring 2005 Utah School of Computing 82Student Name ServerStudent Name Server

Atlas Projection

Page 45: Transformations II

Spring 2005 Utah School of Computing 83Student Name ServerStudent Name Server

Norway is at High Latitude

There is considerable size distortion

Page 46: Transformations II

Spring 2005 Utah School of Computing 84Student Name ServerStudent Name Server

Isometric View

Page 47: Transformations II

Spring 2005 Utah School of Computing 85Student Name ServerStudent Name Server

Engineering Drawing: 2 Planes

AA

AA

Section AA

Page 48: Transformations II

Engineering Drawing: Exploded

View

Understanding 3D Assembly

in a 2D Medium 86

Page 49: Transformations II

Spring 2005 Utah School of Computing 87Student Name ServerStudent Name Server

“True” Perspective in 2Dy

x

(x,y)

p

h

Page 50: Transformations II

Spring 2005 Utah School of Computing 88Student Name ServerStudent Name Server

“True” Perspective in 2D

pxpyh

pxy

ph

Page 51: Transformations II

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

Page 52: Transformations II

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

Page 53: Transformations II

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

Page 54: Transformations II

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

Page 55: Transformations II

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?

Page 56: Transformations II

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!

Page 57: Transformations II

Spring 2005 Utah School of Computing 95Student Name ServerStudent Name Server

What Does This Mean?

x

y

p

Page 58: Transformations II

Spring 2005 Utah School of Computing 96Student Name ServerStudent Name Server

What Does This Mean?y

p

x

Page 59: Transformations II

Spring 2005 Utah School of Computing 97Student Name ServerStudent Name Server

The “Pencil of Lines” Becomes Parallel

y

x

Page 60: Transformations II

Spring 2005 Utah School of Computing 98Student Name ServerStudent Name Server

Parallel Lines Become “Pencil of Lines” !

x

y

Page 61: Transformations II

Spring 2005 Utah School of Computing 99Student Name ServerStudent Name Server

Parallel Lines Become “Pencil of Lines” !

x

y

Page 62: Transformations II

Spring 2005 Utah School of Computing 100Student Name ServerStudent Name Server

What Does This Mean?

x

y

p

Page 63: Transformations II

Spring 2005 Utah School of Computing 101Student Name ServerStudent Name Server

“True” Perspective in 2Dy

p

Page 64: Transformations II

Spring 2005 Utah School of Computing 102Student Name ServerStudent Name Server

“True” Perspective in 2Dy

p

p

p

p

p

p

p

p

Page 65: Transformations II

Spring 2005 Utah School of Computing 103Student Name ServerStudent Name Server

Viewing Frustum

Page 66: Transformations II

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

Page 67: Transformations II

Spring 2005 Utah School of Computing 105Student Name ServerStudent Name Server

Projection Becomes Orthogonal: “Right Thing Happens”

x

(x,y)

h=y

p

Page 68: Transformations II

The End

Transformations II

Lect

ure

Set

7