Docsity

Viewing Transformations: Homogeneous Coordinates and 3D Viewing, Slides of Computer Graphics

Partial preview of the text

Download Viewing Transformations: Homogeneous Coordinates and 3D Viewing and more Slides Computer Graphics in PDF only on Docsity!

Viewing Transformations

Lecture Set 11

Homogeneous Coordinates

An infinite number of points correspond to (x,y,1). They constitute the whole line (tx,ty,t).

x

w

y

w = 1

(tx,ty,t) (x,y,1) Docsity.com

Simple Viewing TransformationExample

Points A B C D E F G H X -1 1 1 -1 -1 1 1 - Y 1 1 -1 -1 1 1 -1 - Z -1 -1 -1 -1 1 1 1 1

Simple Cube Viewedfrom (6,8,7.5)

x

z

A=(-1,1,-1) y

C=(1,-1,-1) B=(1,1,-1)

D=(-1,-1,-1)^ G=(1,-1,1)

H=(-1,-1,1) F=(1,1,1) E=(-1,1,1)

Topology of Cube

A: B: (^) A B (^) D C E F C: D: (^) AB DC GH E: F: AB EF HG G: H: (^) DC (^) EF HG C^ B

H E D

G F A

Simple Example

  • • Give a Cube with cornersView from Eye Position (6,8,7.5)
  • • Look at Origin (0,0,0)“Up” is in z-direction

Simple Viewing Transformation Example

00 00 01 17.^5
T 1 01 10 00 86

x

z

y

z ˆ e y ˆ e x ˆ e

Build LH Coord with T 2

(6,8,0)

x ˆ

z ˆ y ˆ

x

z

y

ze ye xe

Rotate about y with T 3

 (6,8,0) 6 8

10

z ˆ y ˆ x ˆ

Simple Viewing Transformation Example



 

 

 

  

. 06 00. 08 10 T 3.^08100.^600

sin( )^610

cos( )^810

where

Look at the (3-4-5)Right Triangle

10

sin( )^35

cos( )^45

(4) (3)

Simple Viewing Transformation Examle



 

 

 

  000 . 08. 6 .. 086 100

1 0 0 0 T 4

sin( )^35

cos( )^45

where

Map to canonical frustum

  45 20

20

Scale x,y by 2 for normalization



 

 

 

  00 00 01 10

N^02020000

Will view a 20”x20” screen from 20” away. Scale to standard viewing frustum.