viewing transformation

24
8/7/2011

Upload: udayan-gupta

Post on 02-Jul-2015

724 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Viewing transformation

8/7/2011

Page 2: Viewing transformation

Good for mapping objects from one coordinate system

to another

This is what we do with windows and viewports

8/7/2011 2

Page 3: Viewing transformation

Model of objectsworld coordinates: km, mm, etc.

hierarchical models:

human = torso + arm + arm + head + leg + leg

arm = upperarm + lowerarm + hand …

Viewingzoom in, move drawing, etc.

8/7/2011

Page 4: Viewing transformation

8/7/2011

Viewport:

Area on screen to be used for drawing.

Unit: pixels (screen coordinates)

Note: y-axis often points down

Window:

Virtual area to be used by application

Unit: km, mm,… (world coordinates)

(0,0)

(800,600)

(200,200)

(600,400)

(-2,-1)

(2,1)

Page 5: Viewing transformation

8/7/2011

Page 6: Viewing transformation

8/7/2011

Page 7: Viewing transformation

8/7/2011

Page 8: Viewing transformation

Determine a matrix M, such that the window (wx1, wx2, wy1, wy2) is mapped on the viewport (vx1, vx2, vy1, vy2):

A = T(-wx1, -wy1)

B = S(1/(wx2-wx1), 1/(wy2-wy1)) A

C = S(vx2-vx1 ,vy2-vy1)B

M = T(vx1, vy1) C

8/7/2011

Page 9: Viewing transformation

8/7/2011

Page 10: Viewing transformation

8/7/2011

Page 11: Viewing transformation

8/7/2011

Page 12: Viewing transformation

8/7/2011

),(minmin yx

),(maxmax vu

),(minmin vu

),(maxmax yx

Page 13: Viewing transformation

8/7/2011

Page 14: Viewing transformation

8/7/2011

yyvv

xxuu

yx

vu

xx

y

x

y

x

minmax

minmax

minmax

minmax

min

min

min

min

,where

1100

10

01

100

00

00

100

10

01

,

Page 15: Viewing transformation

8/7/2011

Page 16: Viewing transformation

8/7/2011

Page 17: Viewing transformation

8/7/2011

Page 18: Viewing transformation

8/7/2011

Page 19: Viewing transformation

8/7/2011

Page 20: Viewing transformation

8/7/2011

Page 21: Viewing transformation

8/7/2011

Page 22: Viewing transformation

8/7/2011

Page 23: Viewing transformation

8/7/2011

Page 24: Viewing transformation

8/7/2011