Geometric Transformations 2D and 3D

Total Page:16

File Type:pdf, Size:1020Kb

Geometric Transformations 2D and 3D INTRODUCTION TO COMPUTER GRAPHICS Geometric Transformations 2D and 3D Andries van Dam 1 How do we use Geometric Transformations? (1/2) Objects in a scene are a collection of points… These objects have location, orientation, size Corresponds to transformations, Translation (푻), Rotation (푹), and Scaling (푺) 2 How do we use Geometric Transformations? (2/2) A scene has a camera/view point from which the scene is viewed The camera has some location and some orientation in 3-space … These correspond to Translation and Rotation transformations Need other types of viewing transformations as well - learn about them shortly 3 Some Linear Algebra Concepts... 3D Coordinate geometry Vectors in 2 space and 3 space Dot product and cross product – definitions and uses Vector and matrix notation and algebra Identity Matrix Multiplicative associativity E.g. A(BC) = (AB)C Matrix transpose and inverse – definition, use, and calculation Homogeneous coordinates (푥, 푦, 푧, 풘) You will need to understand these concepts! 4 Linear Transformations (1/3) We represent vectors as bold-italic letters (풗) and scalars as just italicized letters (c) Any vector in plane can be defined as b addition of two non-collinear basis vectors in the plane a 풗 = a + b Recall that a basis is a set of vectors with the following two properties: The vectors are linearly independent Any vector in the vector space can be generated by a linear combination of the basis vectors Scalar constants can be used to adjust magnitude and direction of resultant vector 5 Linear Transformations (2/3) Definition of a linear function, f: f 풗 + 풘 = f 풗 + f(풘) where domain and co-domain of f are identical function of a vector addition is equivalent to addition of function applied to each of the vectors f 푐풗 = 푐f 풗 function of a scalar multiplication with a vector is scalar multiplied by function applied to vector Both of these properties must be satisfied in order for f to be a linear operator 6 Linear Transformations (3/3) Graphical Use: transformations of points around the origin (leaves the origin invariant) These include Scaling and Rotations (but not translation), Translation is not a linear function (moves the origin) Any linear transformation of a point will result in another point in the same coordinate system, transformed about the origin 7 Linear Transformations as Matrices (1/2) Linear Transformations can be represented as non-singular (invertible) matrices Let’s start with 2D transformations: 푎 푏 푻 = 푐 푑 The matrix 푻 can also be written as: 푎 푏 푻 푒1 푻 푒2 , where 푻 푒1 = , 푻 푒2 = 푐 푑 Where 푒1 and 푒2 are the standard unit basis vectors along the x and y vectors: 1 0 푒1 = , 푒2 = 0 1 Why is this important? This means we can compute the columns of a transformation matrix one by one by determining how our transformation effects each of the standard unit vectors. Thus 푻 푎 “sends 푒1 to = “ 푐 Use this strategy to derive transformation matrices 8 Linear Transformations as Matrices (2/2) 푥 A transformation of an arbitrary column vector 푦 has form: 푥 푎 푏 푥 푻 = 푦 푐 푑 푦 1 푥 1 푎 푏 1 푎 Let’s substitute for : 푻 = = 0 푦 0 푐 푑 0 푐 1 transformation applied to is 1st column of 푻 0 0 푥 0 푎 푏 0 푏 Now substitute for : 푻 = = 1 푦 1 푐 푑 1 푑 0 transformation applied to is 2nd column of 푻 1 9 Scaling in 2D (1/2) Scale 푥 by 3, 푦 by 2 (Sx = 3, Sy = 2) Side effect: House shifts 푥 푥′ position relative to origin 풗 = (original vertex); 풗’ = (new vertex) 푦 푦′ 풗’ = 푺 풗 Derive 푺 by determining how 푒1 and 푒2 6 9 should be transformed 2 2 1 푠푥 2 3 푒1 = 푠 * 푒1 = (Scale in X by 푠 ) , the 1 0 푥 0 푥 1 first column of 푺 0 0 푒2 = 푠 * 푒2 = (Scale in Y by 푠 ), the 1 푦 푠푦 푦 second column of 푺 푠푥 0 Thus we obtain 푺: 0 푠푦 10 Scaling in 2D (2/2) 푺 is a diagonal matrix - can confirm our Other properties of scaling: derivation by simply looking at does not preserve lengths in objects properties of diagonal matrices: does not preserve angles between parts 푎 0 푥 푎푥 of objects (except when scaling is 푫풗 = 푦 = 푏푦 = 풗’ 0 푏 uniform,푠푥 = 푠푦) where 푫 is some diagonal matrix if not at origin, translates house relative 푡ℎ 푡ℎ 푖 entry of 풗’ = (푖 entry along to origin– often not desired… 푡ℎ diagonal of 푫 ∗ 푖 entry of 풗 ) 푺 multiplies each coordinate of a 풗 by scaling factors (푠푥, 푠푦) specified by the entries along the diagonal, as expected 푠푥 = 푎, 푠푦 = 푏 11 Rotation in 2D (1/2) Rotate by 휃 about origin 풗’ = 푺 풗 where 푥 풗 = 푦 (original vertex) 푥′ 풗’= (new vertex) 푦′ Derive 푹Ө by determining how 푒1 and 푒2 should be transformed 1 cosӨ 푒1 = , first column of 푹 0 sinӨ Ө 0 −sinӨ 푒2 = , second column of 푹 1 cosӨ Ө cos 휃 −푠푖푛휃 Thus we obtain 푹 : Ө 푠푖푛휃 푐표푠휃 12 Rotation in 2D (2/2) Let’s try matrix-vector multiplication cos 휃 −푠푖푛휃 푥 x cos Ө – y sin Ө 푥′ 푹 ∗ 풗 = = = = 풗’ 휃 푠푖푛휃 푐표푠휃 푦 x sin Ө + y cos Ө 푦′ 푥′ = 푥 cos 휃 − 푦 sin 휃 푦′ = 푥 sin 휃 + 푦 cos 휃 Other properties of rotation: preserves lengths in objects, and angles between parts of objects rotation is rigid-body for objects not at the origin, again a translation may be unwanted (i.e., this rotates about origin, not about house’s center of rotation) 13 What about translation? Translation not a linear If we could treat all transformations transformation (not centered about in a consistent manner, i.e., with origin) matrix representation, then could Can’t be represented as a 2x2 combine transformations by invertible matrix … composing their matrices Question: Is there another solution? Let’s try using a Matrix again Answer: Yes, 풗′ = 풗 + 풕, where How? Homogeneous Coordinates: 푑푥 add an additional dimension, the w- 풕 = 푑푦 axis, and an extra coordinate, the w- Addition for translation – this is component inconsistent thus 2D -> 3D (effectively the hyperspace for embedding 2D space) 14 Homogeneous Coordinates (1/3) Allows expression of all three 2D transformations as 3x3 matrices We start with the point 푃2푑 on the 푥푦 plane and apply a mapping to bring it to the 푤-plane in hyperspace 푃2푑 푥, 푦 → 푃ℎ 푤푥, 푤푦, 푤 , 푤 ≠ 0 The resulting (푥’, 푦’) coordinates in our new point 푃ℎ are different from the original (푥, 푦) , where 푥’ = 푤푥, 푦’ = 푤푦 ′ ′ 푃ℎ 푥 , 푦 , 푤 , 푤 ≠ 0 15 Homogeneous Coordinates (2/3) Once we have this point we can apply a homogenized version of our transformation matrices (next slides) to it to get a new point in hyperspace Finally, want to obtain resulting point in 2D-space again so perform a reverse of previous mapping (divide all entries by 푤) This converts our point in hyperspace to a corresponding point in 2D space 푥′ 푦′ 푃2푑 푥, 푦 = 푃2푑 , 푥푤 푤 The vertex 풗 = is now represented 푥 푦 as 풗 = 푦 1 16 Homogeneous Coordinates (3/3) Make transformations map points in hyperplane to another point in hyperplane. Transformations applied to a point in the hyperplane will always yield a result also in the same hyperplane (mathematical closure) 푥 푥′ Transformation 푻 applied to 풗 = 푦 maps to 풗′ = 푦′ 1 1 How do we apply this to our transformation matrices? For linear transformations, maintain 2x2 sub-matrix, expand the matrix as follows, where for 2D transformations, the upper left submatrix is the embedding of either the scale or the rotation matrix derived earlier: 푎 푏 0 푐 푑 0 0 0 1 17 Back to Translation Our translation matrix (푻) can now be represented by embedding the translation vector in the rightcolumn at the top as: 1 0 푑푥 0 1 푑푦 0 0 1 푥 Try it - multiply it by our homogenized vertex 푦 1 1 0 푑푥 푥 푥 + 푑푥 푻 풗 = 0 1 푑푦 푦 = 푦 + 푑푦 = 풗’ 0 0 1 1 1 Coordinates have been translated, 풗’ still homogeneous 18 Transformations Homogenized Translation uses a 3x3 Matrix, but Scaling and Rotation are 2x2 Matrices Let’s homogenize! Doesn’t affect linearity property of scaling and rotation Our new transformation matrices look like this… Transformation Matrix Scaling 푠푥 0 0 0 푠푦 0 0 0 1 Rotation cos휃 −푠푖푛휃 0 푠푖푛휃 푐표푠휃 0 0 0 1 1 0 푑푥 Translation 0 1 푑푦 0 0 1 Note: These 3 transformations are called affine transformations 19 Examples Scaling: Scale by 15 in the 푥 direction, 17 in the 푦 15 0 0 0 17 0 0 0 1 Rotation: Rotate by 123° cos(123) −sin (123) 0 sin (123) cos (123) 0 0 0 1 Translation: Translate by -16 in the 푥, +18 in the 푦 1 0 −16 0 1 18 0 0 1 20 Before we continue! Vectors vs. Points Up until now, we’ve only used the notion of a point in our 2D space We now present a distinction between points and vectors We used Homogeneous coordinates to more conveniently represent translation; hence points are represented as (x, y, 1)T A vector can be rotated/scaled, not translated (always starts at origin), don’t use the Homogeneous coordinate, (x, y, 0)T For now, let’s focus on just our points (typically vertices) 21 Inverses How do we find the inverse of a transformation? Take the inverse of the transformation matrix (thanks to homogenization, they’re all invertible!): Transformation Matrix Inverse Does it make sense? 1/푠푥 0 0 If you scale something by factor X, the Scaling inverse is scaling by 1/X 0 1/푠 0 푦 0 0 1 cos휃 푠푖푛휃 0 Not so obvious, but can use math! Rotation −푠푖푛휃 푐표푠휃 0 Rotation Matrix is orthonormal, so inverse should just be the transpose 0 0 1 1 0 −푑푥 If you translate by X, the inverse is Translation 0 1 −푑푦 translating by -X 0 0 1 22 Composition of Transformations (2D) (1/2) We now have a number of tools at our disposal, we can combine them! An object in a scene uses many transformations in sequence, how do we represent this in terms of functions? Transformation is a function; by associativity we can compose functions: (푓 ° 푔) 푖 This is the same as first applying 푔 to some input 푖 and then applying 푓: (푓(푔(푖))) Consider our functions 푓 and 푔 as matrices (푀1 and 푀2 respectively) and our input as a vector (풗) Our composition is equivalent to 푀1푀2푣 23 Composition of Transformations (2D) (2/2) We can now form compositions of transformation matrices to form a more complex transformation For example, 푻푹푺풗, which scales point, then rotates, then translates: 1 0 푑푥 cos휃 −푠푖푛휃 0 s푥 0 0 푥 0 1 푑푦 푠푖푛휃 푐표푠휃 0 0 s푦 0 푦 0 0 1 0 0 1 0 0 1 1 Note that we apply the matrices in sequence right to left, but practically, given associativity, we can compose them and apply the composite to all the vertices in, say, a mesh.
Recommended publications
  • 2D and 3D Transformations, Homogeneous Coordinates Lecture 03
    2D and 3D Transformations, Homogeneous Coordinates Lecture 03 Patrick Karlsson [email protected] Centre for Image Analysis Uppsala University Computer Graphics November 6 2006 Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 1 / 23 Reading Instructions Chapters 4.1–4.9. Edward Angel. “Interactive Computer Graphics: A Top-down Approach with OpenGL”, Fourth Edition, Addison-Wesley, 2004. Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 2 / 23 Todays lecture ... in the pipeline Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 3 / 23 Scalars, points, and vectors Scalars α, β Real (or complex) numbers. Points P, Q Locations in space (but no size or shape). Vectors u, v Directions in space (magnitude but no position). Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 4 / 23 Mathematical spaces Scalar field A set of scalars obeying certain properties. New scalars can be formed through addition and multiplication. (Linear) Vector space Made up of scalars and vectors. New vectors can be created through scalar-vector multiplication, and vector-vector addition. Affine space An extended vector space that include points. This gives us additional operators, such as vector-point addition, and point-point subtraction. Patrick Karlsson (Uppsala University) Transformations and Homogeneous Coords. Computer Graphics 5 / 23 Data types Polygon based objects Objects are described using polygons. A polygon is defined by its vertices (i.e., points). Transformations manipulate the vertices, thus manipulates the objects. Some examples in 2D Scalar α 1 float. Point P(x, y) 2 floats. Vector v(x, y) 2 floats. Matrix M 4 floats.
    [Show full text]
  • 2-D Drawing Geometry Homogeneous Coordinates
    2-D Drawing Geometry Homogeneous Coordinates The rotation of a point, straight line or an entire image on the screen, about a point other than origin, is achieved by first moving the image until the point of rotation occupies the origin, then performing rotation, then finally moving the image to its original position. The moving of an image from one place to another in a straight line is called a translation. A translation may be done by adding or subtracting to each point, the amount, by which picture is required to be shifted. Translation of point by the change of coordinate cannot be combined with other transformation by using simple matrix application. Such a combination is essential if we wish to rotate an image about a point other than origin by translation, rotation again translation. To combine these three transformations into a single transformation, homogeneous coordinates are used. In homogeneous coordinate system, two-dimensional coordinate positions (x, y) are represented by triple- coordinates. Homogeneous coordinates are generally used in design and construction applications. Here we perform translations, rotations, scaling to fit the picture into proper position 2D Transformation in Computer Graphics- In Computer graphics, Transformation is a process of modifying and re- positioning the existing graphics. • 2D Transformations take place in a two dimensional plane. • Transformations are helpful in changing the position, size, orientation, shape etc of the object. Transformation Techniques- In computer graphics, various transformation techniques are- 1. Translation 2. Rotation 3. Scaling 4. Reflection 2D Translation in Computer Graphics- In Computer graphics, 2D Translation is a process of moving an object from one position to another in a two dimensional plane.
    [Show full text]
  • Projective Geometry Lecture Notes
    Projective Geometry Lecture Notes Thomas Baird March 26, 2014 Contents 1 Introduction 2 2 Vector Spaces and Projective Spaces 4 2.1 Vector spaces and their duals . 4 2.1.1 Fields . 4 2.1.2 Vector spaces and subspaces . 5 2.1.3 Matrices . 7 2.1.4 Dual vector spaces . 7 2.2 Projective spaces and homogeneous coordinates . 8 2.2.1 Visualizing projective space . 8 2.2.2 Homogeneous coordinates . 13 2.3 Linear subspaces . 13 2.3.1 Two points determine a line . 14 2.3.2 Two planar lines intersect at a point . 14 2.4 Projective transformations and the Erlangen Program . 15 2.4.1 Erlangen Program . 16 2.4.2 Projective versus linear . 17 2.4.3 Examples of projective transformations . 18 2.4.4 Direct sums . 19 2.4.5 General position . 20 2.4.6 The Cross-Ratio . 22 2.5 Classical Theorems . 23 2.5.1 Desargues' Theorem . 23 2.5.2 Pappus' Theorem . 24 2.6 Duality . 26 3 Quadrics and Conics 28 3.1 Affine algebraic sets . 28 3.2 Projective algebraic sets . 30 3.3 Bilinear and quadratic forms . 31 3.3.1 Quadratic forms . 33 3.3.2 Change of basis . 33 1 3.3.3 Digression on the Hessian . 36 3.4 Quadrics and conics . 37 3.5 Parametrization of the conic . 40 3.5.1 Rational parametrization of the circle . 42 3.6 Polars . 44 3.7 Linear subspaces of quadrics and ruled surfaces . 46 3.8 Pencils of quadrics and degeneration . 47 4 Exterior Algebras 52 4.1 Multilinear algebra .
    [Show full text]
  • Chapter 12 the Cross Ratio
    Chapter 12 The cross ratio Math 4520, Fall 2017 We have studied the collineations of a projective plane, the automorphisms of the underlying field, the linear functions of Affine geometry, etc. We have been led to these ideas by various problems at hand, but let us step back and take a look at one important point of view of the big picture. 12.1 Klein's Erlanger program In 1872, Felix Klein, one of the leading mathematicians and geometers of his day, in the city of Erlanger, took the following point of view as to what the role of geometry was in mathematics. This is from his \Recent trends in geometric research." Let there be given a manifold and in it a group of transforma- tions; it is our task to investigate those properties of a figure belonging to the manifold that are not changed by the transfor- mation of the group. So our purpose is clear. Choose the group of transformations that you are interested in, and then hunt for the \invariants" that are relevant. This search for invariants has proved very fruitful and useful since the time of Klein for many areas of mathematics, not just classical geometry. In some case the invariants have turned out to be simple polynomials or rational functions, such as the case with the cross ratio. In other cases the invariants were groups themselves, such as homology groups in the case of algebraic topology. 12.2 The projective line In Chapter 11 we saw that the collineations of a projective plane come in two \species," projectivities and field automorphisms.
    [Show full text]
  • Homogeneous Representations of Points, Lines and Planes
    Chapter 5 Homogeneous Representations of Points, Lines and Planes 5.1 Homogeneous Vectors and Matrices ................................. 195 5.2 Homogeneous Representations of Points and Lines in 2D ............... 205 n 5.3 Homogeneous Representations in IP ................................ 209 5.4 Homogeneous Representations of 3D Lines ........................... 216 5.5 On Plücker Coordinates for Points, Lines and Planes .................. 221 5.6 The Principle of Duality ........................................... 229 5.7 Conics and Quadrics .............................................. 236 5.8 Normalizations of Homogeneous Vectors ............................. 241 5.9 Canonical Elements of Coordinate Systems ........................... 242 5.10 Exercises ........................................................ 245 This chapter motivates and introduces homogeneous coordinates for representing geo- metric entities. Their name is derived from the homogeneity of the equations they induce. Homogeneous coordinates represent geometric elements in a projective space, as inhomoge- neous coordinates represent geometric entities in Euclidean space. Throughout this book, we will use Cartesian coordinates: inhomogeneous in Euclidean spaces and homogeneous in projective spaces. A short course in the plane demonstrates the usefulness of homogeneous coordinates for constructions, transformations, estimation, and variance propagation. A characteristic feature of projective geometry is the symmetry of relationships between points and lines, called
    [Show full text]
  • 2 Lie Groups
    2 Lie Groups Contents 2.1 Algebraic Properties 25 2.2 Topological Properties 27 2.3 Unification of Algebra and Topology 29 2.4 Unexpected Simplification 31 2.5 Conclusion 31 2.6 Problems 32 Lie groups are beautiful, important, and useful because they have one foot in each of the two great divisions of mathematics — algebra and geometry. Their algebraic properties derive from the group axioms. Their geometric properties derive from the identification of group operations with points in a topological space. The rigidity of their structure comes from the continuity requirements of the group composition and inversion maps. In this chapter we present the axioms that define a Lie group. 2.1 Algebraic Properties The algebraic properties of a Lie group originate in the axioms for a group. Definition: A set gi,gj,gk,... (called group elements or group oper- ations) together with a combinatorial operation (called group multi- ◦ plication) form a group G if the following axioms are satisfied: (i) Closure: If g G, g G, then g g G. i ∈ j ∈ i ◦ j ∈ (ii) Associativity: g G, g G, g G, then i ∈ j ∈ k ∈ (g g ) g = g (g g ) i ◦ j ◦ k i ◦ j ◦ k 25 26 Lie Groups (iii) Identity: There is an operator e (the identity operation) with the property that for every group operation g G i ∈ g e = g = e g i ◦ i ◦ i −1 (iv) Inverse: Every group operation gi has an inverse (called gi ) with the property g g−1 = e = g−1 g i ◦ i i ◦ i Example: We consider the set of real 2 2 matrices SL(2; R): × α β A = det(A)= αδ βγ = +1 (2.1) γ δ − where α,β,γ,δ are real numbers.
    [Show full text]
  • Euclidean Versus Projective Geometry
    Projective Geometry Projective Geometry Euclidean versus Projective Geometry n Euclidean geometry describes shapes “as they are” – Properties of objects that are unchanged by rigid motions » Lengths » Angles » Parallelism n Projective geometry describes objects “as they appear” – Lengths, angles, parallelism become “distorted” when we look at objects – Mathematical model for how images of the 3D world are formed. Projective Geometry Overview n Tools of algebraic geometry n Informal description of projective geometry in a plane n Descriptions of lines and points n Points at infinity and line at infinity n Projective transformations, projectivity matrix n Example of application n Special projectivities: affine transforms, similarities, Euclidean transforms n Cross-ratio invariance for points, lines, planes Projective Geometry Tools of Algebraic Geometry 1 n Plane passing through origin and perpendicular to vector n = (a,b,c) is locus of points x = ( x 1 , x 2 , x 3 ) such that n · x = 0 => a x1 + b x2 + c x3 = 0 n Plane through origin is completely defined by (a,b,c) x3 x = (x1, x2 , x3 ) x2 O x1 n = (a,b,c) Projective Geometry Tools of Algebraic Geometry 2 n A vector parallel to intersection of 2 planes ( a , b , c ) and (a',b',c') is obtained by cross-product (a'',b'',c'') = (a,b,c)´(a',b',c') (a'',b'',c'') O (a,b,c) (a',b',c') Projective Geometry Tools of Algebraic Geometry 3 n Plane passing through two points x and x’ is defined by (a,b,c) = x´ x' x = (x1, x2 , x3 ) x'= (x1 ', x2 ', x3 ') O (a,b,c) Projective Geometry Projective Geometry
    [Show full text]
  • 1 Homogeneous Coordinates and Vanishing Points
    CSE 152: Solutions to Assignment 1 Spring 2006 1 Homogeneous Coordinates and Vanishing Points In class, we discussed the concept of homogeneous coordinates. In this example, we will confine ourselves to the real 2D plane. A point (x, y)> on the real 2D plane can be represented in homo- geneous coordinates by a 3-vector (wx, wy, w)>, where w 6= 0 is any real number. All values of w 6= 0 represent the same 2D point. Dividing out the third coordinate of a homogeneous point x y > (x, y, z) converts it back to its 2D equivalent: , . z z Consider a line in the 2D plane, whose equation is given by ax + by + c = 0. This can equiv- alently be written as l>x = 0, where l = (a, b, c)> and x = (x, y, 1)>. Noticing that x is a ho- mogeneous representation of (x, y)>, we define l as a homogeneous representation of the line ax + by + c = 0. Note that the line (ka)x + (kb)y + (kc) = 0 for k 6= 0 is the same as the line ax + by + c = 0, so the homogeneous representation of the line ax + by + c = 0 can be equivalently given by (a, b, c)> or (ka, kb, kc)> for any k 6= 0. All points (x, y) that lie on the line ax + by + c = 0 satisfy the equation l>x = 0, thus, we can say that a condition for a homogeneous point x to lie on the homogeneous line l is that their dot product is zero, that is, l>x = 0.
    [Show full text]
  • Homogeneous Coordinates
    Homogeneous Coordinates Jules Bloomenthal and Jon Rokne Department of Computer Science The University of Calgary Introduction Homogeneous coordinates have a natural application to Computer Graphics; they form a basis for the projective geometry used extensively to project a three-dimensional scene onto a two- dimensional image plane. They also unify the treatment of common graphical transformations and operations. The graphical use of homogeneous coordinates is due to [Roberts, 1965], and an early review is presented by [Ahuja, 1968]. Today, homogeneous coordinates are presented in numerous computer graphics texts (such as [Foley, Newman, Rogers, Qiulin and Davies]); [Newman], in particular, provides an appendix of homogeneous techniques. [Riesenfeld] provides an excellent introduction to homogeneous coordinates and their algebraic, geometric and topological significance to Computer Graphics. [Bez] further discusses their algebraic and topological properties, and [Blinn77, Blinn78] develop additional applications for Computer Graphics. Homogeneous coordinates are also used in the related areas of CAD/CAM [Zeid], robotics [McKerrow], surface modeling [Farin], and computational projective geometry [Kanatani]. They can also extend the number range for fixed point arithmetic [Rogers]. Our aim here is to provide an intuitive yet theoretically based discussion that assembles the key features of homogeneous coordinates and their applications to Computer Graphics. These applications include affine transformations, perspective projection, line intersections, clipping, and rational curves and surfaces. For the sake of clarity in accompanying illustrations, we confine our 1 2 development to two dimensions and then use the intuition gained to present the application of homogeneous coordinates to three dimensions. None of the material presented here is new; rather, we have tried to collect in one place diverse but related methods.
    [Show full text]
  • Introduction to Homogeneous Coordinates
    COMP 558 lecture 3 Sept. 8, 2009 Last class we considered smooth translations and rotations of the camera coordinate system and the resulting motions of points in the image projection plane. These two transformations were expressed mathematically in a slightly different way. A translation was expressed by a vector subtraction, and a rotation was expressed by a matrix multiplication. Introduction to Homogeneous coordinates Today we will learn about an alternative way to represent translations and rotations which allows them both to be expressed as a matrix multiplication. This has certain computational and notational conveniences, and eventually leads us to a wider and interesting class of transformations. Suppose we wish to translate all points (X,Y,Z) by adding some constant vector (tx, ty, tz) to all coordinates. So how do we do it? The trick is to write out scene points (X,Y,Z) as points in ℜ4, and we do so by tacking on a fourth coordinate with value 1. We can then translate by performing a matrix multiplication: X + tx 1 0 0 tx X Y + ty 0 1 0 ty Y = . Z + t 0 0 1 t Z z z 1 000 1 1 We can perform rotations using a 4× 4 matrix as well. Rotations matrices go into the upper-left 3 × 3 corner of the 4 × 4 matrix: ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 0001 i.e. nothing interesting happens in the fourth row or column. Last lecture we looked at rotations about the X,Y,Z axes only. We will discuss other rotation matrices later today. Notice that we can also scale the three coordinates: σX X σX 0 0 0 X σY Y 0 σY 0 0 Y = .
    [Show full text]
  • Homogeneous Coordinates
    Homogeneous Coordinates Jules Bloomenthal and Jon Rokne Department of Computer Science The University of Calgary Introduction Homogeneous coordinates have a natural application to Computer Graphics; they form a basis for the projective geometry used extensively to project a three-dimensional scene onto a two- dimensional image plane. They also unify the treatment of common graphical transformations and operations. The graphical use of homogeneous coordinates is due to [Roberts, 1965], and an early review is presented by [Ahuja, 1968]. Today, homogeneous coordinates are presented in numerous computer graphics texts (such as [Foley, Newman, Rogers, Qiulin and Davies]); [Newman], in particular, provides an appendix of homogeneous techniques. [Riesenfeld] provides an excellent introduction to homogeneous coordinates and their algebraic, geometric and topological significance to Computer Graphics. [Bez] further discusses their algebraic and topological properties, and [Blinn77, Blinn78] develop additional applications for Computer Graphics. Homogeneous coordinates are also used in the related areas of CAD/CAM [Zeid], robotics [McKerrow], surface modeling [Farin], and computational projective geometry [Kanatani]. They can also extend the number range for fixed point arithmetic [Rogers]. Our aim here is to provide an intuitive yet theoretically based discussion that assembles the key features of homogeneous coordinates and their applications to Computer Graphics. These applications include affine transformations, perspective projection, line intersections, clipping, and rational curves and surfaces. For the sake of clarity in accompanying illustrations, we confine our 1 2 development to two dimensions and then use the intuition gained to present the application of homogeneous coordinates to three dimensions. None of the material presented here is new; rather, we have tried to collect in one place diverse but related methods.
    [Show full text]
  • 15-462: Computer Graphics
    !"#$%&'()*+,-./0(102,3456 72.3(8*0()*+,-./0(102,3456 ! #$%&'()*$+)#$,-. / 01'2$+( / 345-2&$6()*$+)'5+71()-6,)(5+*-'1( 8 9:%;&'&2)145-2&$6( 8 <-+-:12+&')145-2&$6( / =-+.'162+&')>$$+,&6-21( !" #$%&'(')*+,-.)'/01 2 !"#$%&%'()*+,'%-./ .3+*.*4.5*)/*6+7'0+* (-38+1*.06*1-37.(+19 2 #0*!:;*.*(-38+*(.0*<+*6+7'0+6*<5 0=1;2>*?*" 7/3*1/$+*1(.&.3*7-0()'/0*0 /7*1 .06*29 2 #0*@:;*.*1-37.(+*(.0*<+*6+7'0+6*<5 0=1;234>*?*" 7/3*1/$+*1(.&.3*7-0()'/0*0 /7*1;*2;*.06*49 !" #$%&'(')*+,-.)'/01 2 34+*5-0()'/0*! +6.&-.)+1*)/*7*.)*+6+89*%/'0)* /0*)4+*(-86+*/8*1-85.(+:*.0;*')*+6.&-.)+1*)/* .*0/0<=+8/*8+.&*0-$>+8*.)*.&&*/)4+8*%/'0)1? 2 @-&)'%&9'0A*! >9*.*0/0<=+8/*(/+55'('+0)* %8+1+86+1*)4'1*%8/%+8)9:*1/*B+*(.0*8+B8')+ !C":#D*E*7 .1*$!C":#D*E*7 5/8*.09*0/0<=+8/*$? 2 34+*'$%&'+;*(-86+*'1*-0.55+()+;? !" f(x,y) + - "#$%&'&()*+,-(&./0 !"#$%&'#()*+,#-.$+/0 1 2-.$3435*67*43(4$+ 1 2-.$3435*67*$38+ 1 2-.$3435*97*.$#8+ !! #$%&'(')*+,-.)'/01 2 3+*(.&&*)4+1+*+,-.)'/01*5'$%&'(')6 7+(.-1+* .&)4/-84*)4+9*'$%&9*.*(-:;+*/:*1-:<.(+=* )4+9*(.00/)*+>%&'(')&9*8+0+:.)+*)4+*%/'0)1* )4.)*(/$%:'1+*')? 2 #0*/:@+:*)/*8+0+:.)+*%/'0)1=*A+*0++@* .0/)4+:*</:$B !" #$%$&'(%)*+',-$()./0 1 !"#"$%&#'()%*+"&',-. .22'%+(3'+*$4$5)6)(7+(.+ 8'/'%$('+*./()/-.-0+*-%9'0+$/:+0-%2$*'0; 1 <.%+*-%9'0=+4$%$&'(%)*+',-$()./0+($>'+(3'+ 2.%& / ?+0@&A 1)2) 3@&A 4 ?+5@&A 1 <.%+BC+0-%2$*'0=+D'+3$9' / ?+0@.=&A 1)2)3@.=&A 4 ?+5@.=&A !" #$%$&'(%)*+',-$()./0 1 23'+!"#"$%&%#' 4.%+(3'0'+',-$()./0+$%'+ 0*$5$%0+(3$(+%$/6'+.7'%+$+*./()/-.-0+ 89.00):5;+)/4)/)('<+)/('%7$5= 1 >$%;)/6+(3'+9$%$&'('%0+.7'%+(3')%+'/()%'+ )/('%7$50+0&..(35;+6'/'%$('0+'7'%;+9.)/(+ ./+(3'+*-%7'+.%+0-%4$*'= !" #$%&'(')*+,-.)'/01 !"#$%&'#()*+,#-.$+/0 1 2#(#-+3(45*67*$48+ 1 2#(#-+3(45*/."+(+ !" #$%&'()*$+)#$,-.
    [Show full text]