Download presentation
Presentation is loading. Please wait.
Published byNatalie Little Modified over 9 years ago
1
1 Homogeneous Transformation Ref: Richard Paul Chap. 1
2
2 Notation Vector: v Plane: P Frame: I, A Point in space: p Point p as a vector v in frame E: E v Same point as a vector w in frame H: H w Discussion is in 3-space
3
3 Vectors [a,b,c,0] T : point at infinity Inner (dot) product Outer (cross) product Homogeneous coordinate w
4
4 Planes Compared with ax+by+cz+d = 0 … [x/w,y/w,z/w] [a/m,b/m,c/m] -d/m Point v on a plane:
5
5 Transformation v = Hu With homogeneous coordinates, translate and rotation become linear transformations in R 4
6
6 Plane Equation after Transformation Given the transform: Q (the plane P after transformation H): Proof: We require: (=0)
7
7 Example The transform H: The plane P defined by these points: (0,0,2), (1,0,2), (0,1,2) is [0,0,1,-2] The plane after transformation: How to compute H -1 (see next page) … Transformed points are (6,-3,7), (6,-2,7), (6,-3,8)
8
8 Inverse Transformation Assumption: [n o a] is orthogonal Verify:
9
9 Recall Normal Matrix In OpenGL, normal vectors are transformed by normal matrix into eye space Normal matrix is the inverse transpose of modelview matrix (M -T ) Normal vector and plane equation are related!
10
10 Rotating a Point A B x x’x’ Point rotation is closely related to coordinate transformation (next page) Point rotation is closely related to coordinate transformation (next page) (same coordinates in new bases)
11
11 Coordinate Transformation B A x Rotation that takes frame B to frame A
12
12 Ex: Coordinate Transform A Bx
13
13 Ex: Coordinate Transform A B x
14
14 Coordinate Transform glTranslatef (2,1,0); glRotatef (30,0,0,1); drawtank(); tank Use the transformation of the tank (and its local coordinates) to find the world coordinates of specific points. Vec3 X = proj (HTrans4(vec3(2,1,0))*HRot4(Vec3(0,0,1),30*3.14/180)*vec4(3,0,0,1); Implemented by SVL (ex: tip of tank) A W (3,0)
15
15 Extra
16
16 Relative Transform & Frames Rot(z,90) Rot(y,90) Trans(4,-3,7)
17
17 Reference Frame
18
18 Reference Frame (cont) The transformed vector is the same vector described w.r.t. the reference frame
19
19 Transform Equation omit superscript s
20
20 The Problem A B O Transform Equation O A A B = O B ABAB
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.