1 Geometrical Transformation
2 Outline General Transform 3D Objects Quaternion & 3D Track Ball
3 Modeling Transform Specify transformation for objects –Allow definitions of objects in own coordinate systems –Allow use of object definition multiple times in a scene
4Overview 2D transformations –Basic 2-D transformations –Matrix representation –Matrix composition 3D transformations –Basic 3-D transformation –Same as 2-D Transformation Hierarchies –Scene graphs
5 2-D Transformations
6
7
8
9
10 2-D Transformations
11 Basic 2D Transformations
12 Basic 2D Transformations
13 Basic 2D Transformations
14 Rotation around the origin (2-D)
15 Rotation around the origin (2-D)
16 Rotation around the origin (2-D)
17 Rotation (3-D)
18 Rotation (3-D)
19 Basic 2D Transformations
20 Basic 2D Transformations
21 Basic 2D Transformations
22 Matrix Representation
23 Matrix Representation
24 2x2 Matrix
25Scaling
26 Scaling Around A Point
27 2x2 Matrix
28 Shear (2-D)
29 Shear (3-D)
30 2x2 Matrix
31 2x2 Matrix
32 2D Translation
33 Basic 2D Transformations
34 Homogeneous Coordinates
35 Linear Transformations
36 Affine Transformations
37 Projective Transformations
38 Matrix Composition
39 Matrix Composition
40 Matrix Composition
41 Matrix Composition
42 3D Transformations
43 Basic 3D Transformations
44 Basic 3D Transformations
45 GENERAL ROTATION ABOUT ANAXIS An axis in space is specified by a point P and a vector direction. Suppose that we wish to rotate an object about this arbitrary axis.
46 Developing the General Rotation Matrix
47 Developing the General Rotation Matrix
48 Developing the General Rotation Matrix
49 Developing the General Rotation Matrix
50 Developing the General Rotation Matrix
51 Developing the General Rotation Matrix Be careful ………… Z X (+,+) (-,-) In both cases, tan(y/x) are positive. So, we need to carefully choose it by checking the signs of x and y
52 Developing the General Rotation Matrix Another problem is: rotation interpolation is not easy and not good reported in many papers.
53
54
55 Angular displacement glRotate( , Ax,Ay,Az) (,n) defines an angular displacement of about an axis u or n for rotating a vector v
56 The above formula is a matrix form, so we can use Matrix to compute rotation In above equation, v=(x,y,z) T and n=(a x,a y,a z ) T
57
58
59
60
61 Inverse Transformation
62 Inverse Transformation
63 Transform points, lines, planes etc.
64 Transforming Normals
65 Transformation Hierarchies
66 OpenGL transformation Matrices
67 OpenGL transformation Matrices
68 OpenGL transformation Matrices
69 OpenGL transformation Matrices
70 Transformation Example 1
71 Transformation Example 2
72 Transformation Example 2
73 Hierarchical Scene Graph This topics will be taught in future or the next semester!!
74
75
76
77
78
79
80
81
82
83
84
85
86Applications
87 Applications
88 Applications
89
90
91
92
93