Download presentation
Presentation is loading. Please wait.
2
Viewing Transformations CS5600 Computer Graphics by Rich Riesenfeld 5 March 2002 Lecture Set 11
3
Homogeneous Coordinates An infinite number of points correspond to (x,y,1). They constitute the whole line (tx,ty,t). w = 1 (tx,ty,t) (x,y,1)
4
CS56003 Illustration: Old Style, Simple Transformation Sequence for 3D Viewing
5
CS56004 Simple Viewing Transformation Example PointsABCDEFGH X11 11 Y11 11 Z 1111
6
Simple Cube Viewed from (6,8,7.5) A=(-1,1,-1) B=(1,1,-1) C=(1,-1,-1) D=(-1,-1,-1) G=(1,-1,1) E=(-1,1,1) H=(-1,-1,1) F=(1,1,1)
7
CS56006 Topology of Cube ABCDEFGH A01011000 B10100100 C01010010 D10100001 E10000101 F01001010 G00100101 H00011010 BC E H D F G A
8
CS56007 Topology of Cube A:BDE B:ACF C:BDG D:ACH E:AFH F:BEG G:CFH H:DEG BC E H D F G A
9
CS56008 Simple Example Give a Cube with corners View from Eye Position (6,8,7.5) Look at Origin (0,0,0) “Up” is in z-direction
10
CS56009 Translate Origin by (6,8,0)
11
CS560010 Simple Viewing Transformation Example
12
CS560011 Build LH Coord with (6,8,0)
13
CS560012 Build LH Coord with
14
CS560013 Rotate about y with (6,8,0) 6 8 10
15
CS560014 Simple Viewing Transformation Example
16
CS560015 Rotate about x-axis with 7.5 10
17
CS560016 Look at the (3-4-5) Right Triangle 7.5 10 12.5 (4) (5) (3)
18
CS560017 Simple Viewing Transformation Examle
19
CS560018 View on 10x10 screen, 20 away 10 20
20
CS560019 Map to canonical frustum 20
21
CS560020 Scale x,y by 2 for normalization Will view a 20”x20” screen from 20” away. Scale to standard viewing frustum.
22
CS560021 Simple Viewing Transformation Example
23
CS560022 Clipping not needed, so project
24
CS560023 Transformation of Cube
25
CS560024 Cube Transformed for Viewing PtsABCDEFGH X 2.8-0.4-2.80.42.8-0.4-2.80.4 Y -1.84-3.28-1.36.081.36-.081.843.28 Z 12.9411.9813.2614.2211.7410.7812.0613.02
26
G=(-2.8,1.84) 25 PtXY A2.8-1.84 B-0.4-3.28 C-2.8-1.36 D0.408 E2.81.36 F-0.4-.08 G-2.81.84 H0.43.28 A:BDE B:ACF C:BDG D:ACH E:AFH F:BEG G:CFH H:DEG Transformed Cube B=(-0.4,-3.28) C=(-2.8,-1.36) D=(0.4,.08) E=(2.8,1.36) A=(2.8,-1.84) H=(0.4,3.28) F=(-0.4,-.08)
27
CS560026 Recall mapping [a,b] [-1,1] Translate center of interval to origin Normalize interval to [-1,1]
28
CS560027 Substitute x =a: x Recall mapping [a,b] [-1,1]
29
CS560028 Substitute x =b: x Recall mapping [a,b] [-1,1]
30
CS560029 Map to the (1K x 1K) screen Assume screen origin (0,0) at lower left. This translates old (0,0) to center of screen (511,511).
31
CS560030 Map to the (1K x 1K) screen Proper scale factor for mapping: [-1,1] to (-511,+511)
32
CS560031 Combine Screen Transformation
33
CS560032 For General Screen: ……
34
CS560033 Transformation to Std Clipping Frustum
35
CS560034 Transforming to Std Frustum
36
CS560035 Transforming to Std Frustum
37
CS560036 Transforming to Std Frustum The right scale matrix to map to canonical form
38
CS560037 Transforming to Std Frustum
39
Determining Rotation Matrix
40
CS560039 Frame rotation,
41
CS560040 Inverse problem easy,
42
CS560041 In matrix representation of, Columns are simply images of
43
CS560042 Rotation matrix M columns given by frame’s pre-image Column i of is
44
CS560043 Inverse of rotation matrix M Recall, for rotation matrix R, So,
45
CS560044 Rotation matrix M Row i is simply Simply write M down! Thus,
46
CS560045 Frame Rotation:
47
46
48
47
49
48
50
49
51
50
52
51
53
52
54
The End of Viewing Transformations Lecture Set 11 53
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.