1 / 16

Types of Transformations Euclidean rigid body operations: rotation and translation

Types of Transformations Euclidean rigid body operations: rotation and translation congruence, distance, and parallelism preserved Affine rotation. translation. uniform or differential scale parallelism , and ratio of parallel distances preserved Projective

Download Presentation

Types of Transformations Euclidean rigid body operations: rotation and translation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Types of Transformations Euclidean rigid body operations: rotation and translation congruence, distance, and parallelism preserved Affine rotation. translation. uniform or differential scale parallelism, and ratio of parallel distances preserved Projective rotation, translation, scale, perspective straight lines preserved

  2. Before the Rasterizer Perspective Space Eye Space World Space persp. divide viewport transform [G1] [G2] … [Gn] [E] [P] clip project xyz1 OpenGL’s “modelView” [G1] …[Gn] affine matrices (for scale, translation, rotation, and shear) [E] world (scene) to eye (camera) matrix [P] OpenGL’s “persp” matrix

  3. Homogeneous Coordinates Homogeneous coordinates have a natural application to computer graphics, ever since their use in a 4x4 matrix by Roberts (1963). Advantages Compact Points at infinity can be represented with finite coordinates Formulas are simpler and more symmetric than Cartesian counterparts

  4. Equivalences from “ordinary” 3D point to homogeneous point (x, y, z)  (x, y, z, 1) from 4D homogeneous point to ordinary 3D point (x, y, z, w)  (x/w, y/w, z/w)

  5. Möbius introduced a set of “barycentric” coordinates for a point p inside a triangle (a,b,c) (waa, wbb, wcc) w is relatedto area: wa = Aa/(Aa+Ab+Ac). wa+wb+wc = 1

  6. In a homogeneous coordinate system, a point is invariant when scaled. A homogeneous point (x,y,w) may be taken as an ordinary point if it is a ray to the origin is intersected by the w = 1 plane.

  7. In the above, w’ will always be 1

  8. Consider a projection matrix that yields w’ not equal to 1

  9. Image point (x’, y’) is computed from the object point (x, y, z), effecting similar triangles: y’/y = D/z and x’/x = D/z, or (x’, y’) = (xD/z, yD/z). side view The division by z is known as the perspective divide.

  10. Introducing a non-zero term into the fourth column does not affect x’ and y’, but z’ becomes D-D/z. For z =1, z’ = 0, and for z = ∞, z’ = D.

  11. OpenGL uses a right-handed coordinate system, right-handed rotations, and column-major matrices That is, OpenGL expects an argument GLdouble *m to point to a series of doubles, the first four (m[0][0], m[0][1], m[0][2], m[0][3]) representing the first column of the matrix, the second four the second column, etc.

  12. To Infinity and Beyond! in Eye Space, eye is at the origin, facing to the right in Perspective Space, eye is at (0,0,+inf), facing right

  13. 3D Perspective woodcuts by Albrecht Durer 1525 self-potrait 1500

  14. perspective is a depth cue for monocular and binocular vision

  15. For Planar Perspective Projection In 3D, a straight line is given by a point and a direction; that is, a line is described parametrically by a set of points P: P = B+tV. That is, rewriting the first: t = (x-bx)/vx andrewriting the third: z = bz+(x-bx)vz/vx Thus, on a line, z is linearly related to x (and to y) x = bx+tvx y = by+tvy z = bz+tvz

  16. 2 by 2 linear transformation gives x’ = a1x+b1y y’ = a2x+b2y 3 by 3 gives x’ = a1x+b1y+c1z y’ = a2x+b2y+c2z z’ = a3x+b3y+c3z 4 by 4 homogeneous affine gives x’ = a1x+b1y+c1z+d1 y’ = a2x+b2y+c2z+d2 z’ = a3x+b3y+c3z+d3 w’ = 1 this is a linear combination of x, y, and z, and therefore z’ is linearly related to x’ (and to y’, and to z) 4 by 4 perspective, however, gives this is ‘linear rational’ - z’ is no longer linearly related to z, but because the denominators are the same for x’, y’, and z’, z’ remains linearly related to x’ and to y’ x’ = (a1x+b1y+c1z+d1)/(ex+fy+gz+h) y’ = (a2x+b2y+c2z+d2)/(ex+fy+gz+h) z’ = (a3x+b3y+c3z+d3)/(ex+fy+gz+h) Thus, a straight line in 3D yields a straight line under planar perspective projection (and thank goodness for that).

More Related