shear & perspective

37
Shear & Perspective CS5600 Computer Graphics Rich Riesenfeld Spring 2006 (Sp2014 edits by T. J. Peters) Lecture Set 7

Upload: trilby

Post on 23-Jan-2016

49 views

Category:

Documents


0 download

DESCRIPTION

Shear & Perspective. CS5600 Computer Graphics Rich Riesenfeld Spring 2006 (Sp2014 edits by T. J. Peters). Lecture Set 7. 3D Shear in x -direction. 3D Shear in x -direction. 3D Shears : Clamp a Principal Plane , shear in other 2 DoFs. Shear in x . . then , y :. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Shear & Perspective

Shear & Perspective

CS5600 Computer Graphics

Rich RiesenfeldSpring 2006(Sp2014 edits by T. J. Peters)

Lect

ure

Set

7

Page 2: Shear & Perspective

Spring 2006 Utah School of Computing 2

3D Shear in x -direction

111000

0100

0010

001

)(z

y

ayx

z

y

xa

aShx

Page 3: Shear & Perspective

Spring 2006 Utah School of Computing 3

3D Shear in x -direction

111000

0100

0010

001

)(z

y

bzx

z

y

xb

bShx

Page 4: Shear & Perspective

Spring 2006 Utah School of Computing 4

3D Shears: Clamp a Principal Plane, shear in other 2 DoFs

x

z

y

Page 5: Shear & Perspective

Spring 2006 Utah School of Computing 5

Shear in x . . then,

y :

)1,0(

)0,0(

)1,0(

)0,0(

)1,0(

)0,0()0,1(

)1,0(

)0,0(

)1,1( b

)1,1(

),1( b

12

32

11 0 1

1

12

1 10 1

)0,1(

)1,1(

312 2

( , )

3 52 2

( , )

12

( ,1) 32

( ,1)

Page 6: Shear & Perspective

x

z

y

111000

0100

0010

001

)(z

y

ayx

z

y

xa

aShx

x

z

y

Page 7: Shear & Perspective

Spring 2006 Utah School of Computing 7

3D Shear in y -direction

111000

0100

010

0001

)(z

czy

x

z

y

x

ccShy

Page 8: Shear & Perspective

Spring 2006 Utah School of Computing 8

3D Shear in y -direction

111000

0100

001

0001

)(z

ydx

x

z

y

x

ddShy

Page 9: Shear & Perspective

x

z

y

x

z

y

111000

0100

001

0001

)(z

ydx

x

z

y

x

ddShy

Page 10: Shear & Perspective

Spring 2006 Utah School of Computing 10

3D Shear in z-direction

111000

010

0010

0001

)(zex

y

x

z

y

x

eeShz

Page 11: Shear & Perspective

Spring 2006 Utah School of Computing 11

3D Shear in z

111000

010

0010

0001

)(zex

y

x

z

y

x

eeShz

Page 12: Shear & Perspective

Spring 2006 Utah School of Computing 12

3D Shear in z

111000

010

0010

0001

)(zfy

y

x

z

y

x

ffShz

Page 13: Shear & Perspective

Spring 2006 Utah School of Computing 13

Shear Inverse

1

1

1

1

0

0

1

01

1

01

0

0

10

1

10

1

bb

aa

Page 14: Shear & Perspective

Spring 2006 Utah School of Computing 14

Shear Inverse

1

01

1

01

10

1

10

1

1

1

bb

aa

Page 15: Shear & Perspective

Spring 2006 Utah School of Computing 15

Double Shear in x and y

ab)(10

1

1

01

1

1

b

aa

b

1

1 ab)(

1

01

10

1

b

a

b

a

( )aShx( )bSh y

( )aShx ( )bSh y

Page 16: Shear & Perspective

Spring 2006 Utah School of Computing 16

Ex: a = 0.5 and b =1.0

1

1

1 0 1

1 0 1 ( ab)

a a

b b

1

1 ab)(

1

01

10

1

b

a

b

a

( )aShx( )bSh y

( )aShx ( )bSh y

Page 17: Shear & Perspective

Spring 2006 Utah School of Computing 17

Shear in x . . then,

y :

)1,0(

)0,0(

)1,0(

)0,0(

)1,0(

)0,0()0,1(

)1,0(

)0,0(

)1,1( b

)1,1(

),1( b

12

32

11 0 1

1

12

1 10 1

)0,1(

)1,1(

312 2

( , )

3 52 2

( , )

12

( ,1) 32

( ,1)

Page 18: Shear & Perspective

Spring 2006 Utah School of Computing 18

)1,0(

)0,0(

)1,0(

)0,0(

)1,0(

)0,0()0,1( )0,1(

)1,0(

)0,0(

(1, 2)

)1,1(

)0,1(

)1,1(

12

( ,1) 32

( ,1)

32

( ,1)

12

( ,1)

(2, 2)

Shear in x . then, y :

12

32

11 0 1

1

12

1 10 1

Page 19: Shear & Perspective

Spring 2006 Utah School of Computing 19

Shears in x and y do not Commute

)1,0(

)0,0(

1( , )a

Sh in x (a=½) , then Sh y(b=1)

Sh in y (b=1) , then

Sh in x (a=½)

Page 20: Shear & Perspective

Spring 2006 Utah School of Computing 20

Shear in x then in y)1,0(

)0,0(

)1,0(

)0,0(

)1,0(

)0,0()0,1( )0,1(

),(1 bab

),( 1a

),( 1 aba

),( 11 baba

),( 11 a

)1,0(

)0,0(

)1,1( b

)1,1(

),1( b

Page 21: Shear & Perspective

Spring 2006 Utah School of Computing 21

Shear in y then in x)1,0(

)0,0(

)1,0(

)0,0(

)1,0(

)0,0()0,1( )0,1(

),(1 b

),( 1a

),( 1 aba

),( 11 abba

),( 11 a

)1,0(

)0,0(

)1,1( b

)1,1(

)0,1(

),1( b

Page 22: Shear & Perspective

Spring 2006 Utah School of Computing 22

Results Are Different

y then x: x then y:

Page 23: Shear & Perspective

Spring 2006 Utah School of Computing 23

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 24: Shear & Perspective

Spring 2006 Utah School of Computing 24

“True” Perspective in 2Dy

x

(x,y)

p

h

Page 25: Shear & Perspective

Spring 2006 Utah School of Computing 25

“True” Perspective in 2D

pxpyh

pxy

ph

Page 26: Shear & Perspective

Spring 2006 Utah School of Computing 26

“True” Perspective in 2Dy

x

(x,y)

p

h

Page 27: Shear & Perspective

Spring 2006 Utah School of Computing 27

“True” Perspective in 2D

pxpyh

pxy

ph

Page 28: Shear & Perspective

Spring 2006 Utah School of Computing 28

“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 29: Shear & Perspective

Spring 2006 Utah School of Computing 29

Geometry Same for Eye at Originy

x

(x,y)

p

h

Screen Plane

Page 30: Shear & Perspective

Spring 2006 Utah School of Computing 30

Values below 0?y

x

(x,y)

p

h

Page 31: Shear & Perspective

Spring 2006 Utah School of Computing 31

“True” Perspective in 2Dy

p

Page 32: Shear & Perspective

Spring 2006 Utah School of Computing 32

“True” Perspective in 2Dy

p

p

p

p

p

p

p

p

Page 33: Shear & Perspective

Spring 2006 Utah School of Computing 33

“True” Perspective in 2Dy

p

Page 34: Shear & Perspective

Spring 2006 Utah School of Computing 34

Viewing Frustum

Page 35: Shear & Perspective

Spring 2006 Utah School of Computing 35

What happens for large p?”

1 0 0

0 1 0

0 1

1

1

1 0 0

0 1 0

1 0 1 1

lim 0

0p

p

x x

y y

p

Page 36: Shear & Perspective

Spring 2006 Utah School of Computing 36

Projection Becomes Orthogonal: “Right Thing Happens”

x

(x,y)

h=y

p

Page 37: Shear & Perspective

The End

(Modified) Transformations II

Lect

ure

Set

7x