Natural Homogeneous Coordinates Edward J
Total Page:16
File Type:pdf, Size:1020Kb
Advanced Review Natural homogeneous coordinates Edward J. Wegman∗ and Yasmin H. Said The natural homogeneous coordinate system is the analog of the Cartesian coordinate system for projective geometry. Roughly speaking a projective geometry adds an axiom that parallel lines meet at a point at infinity. This removes the impediment to line-point duality that is found in traditional Euclidean geometry. The natural homogeneous coordinate system is surprisingly useful in a number of applications including computer graphics and statistical data visualization. In this article, we describe the axioms of projective geometry, introduce the formalism of natural homogeneous coordinates, and illustrate their use with four applications. 2010 John Wiley & Sons, Inc. WIREs Comp Stat 2010 2 678–685 DOI: 10.1002/wics.122 Keywords: projective geometry; crosscap; perspective; parallel coordinates; Lorentz equations PROJECTIVE GEOMETRY Visualizing the projective plane is itself an intriguing exercise. One can imagine an ordinary atural homogeneous coordinates for projective Euclidean plane augmented by a set of points at geometry are the analog of Cartesian coordinates N infinity. Two parallel lines in Euclidean space would for ordinary Euclidean geometry. In two-dimensional meet at a point often called in elementary projective Euclidean geometry, we know that two points will geometry an ideal point. One could imagine that a always determine a line, but the dual statement, two pair of parallel lines would have an ideal point at each lines always determine a point, is not true in general end, i.e. one at −∞ and another at +∞. However, because parallel lines in two dimensions do not meet. there is only one ideal point for a set of parallel lines, The axiomatic framework for projective geometry not one at each end. The significance of axiom 6, adds the axiom that two lines in two dimensions will which may seem strange at first, can be thought of always meet at a point. Thus, in two-dimensional as follows. A projective line can be thought of as projective geometry, two points determine a line an ordinary Euclidean line together with that extra and two lines determine a point. This introduces ideal point at ±∞. Of course, there is a one-to- a complete duality between lines and points. A one correspondence with the Euclidean line and the statement true about points and lines will also be real numbers. The ideal point is the left-over point true if the words points and lines are interchanged.1,2 that is not in one-to-one correspondence. Of course, The axioms for projective geometry are as there is also the set of ideal points, which is the follows: ideal line. There is an ideal point on the ideal line corresponding to every slope between −∞ and +∞, 1. There exists at least one line. hence for every point on the real line. There is one 2. On each line there are at least three points. extra point on the ideal line corresponding to an 3. Not all points lie on the same line. infinite slope. Thus axiom 6 holds whether the line is an ordinary Euclidean line plus an ideal point or the 4. Two distinct points lie on one and only one line. line is the ideal line. 5. Two distinct lines meet at one and only one Because of duality these axioms can be rewritten point. with the words, point and line interchanged. 6. There is a one-to-one correspondence between the real numbers and all but one point on a 1a. There exists at least one point. line. 2a. Through each point there are at least three lines. ∗Correspondence to: [email protected] Center for Computational Data Sciences, George Mason University, 3a. Not all lines pass through the same point. Fairfax, VA, USA 4a. Two distinct lines meet at one and only one DOI: 10.1002/wics.122 point (cf. 5 above). 678 2010 John Wiley & Sons, Inc. Volume 2, November/December 2010 WIREs Computational Statistics Natural homogeneous coordinates 5a. Two distinct points lie on one and only one Line parallel to plane line (cf. 4 above). Ideal point 6a. There is a one-to-one correspondence between the real numbers and all but one line through a point. (0,0) MODELS FOR A PROJECTIVE PLANE Projective plane An alternate way of imagining the projective plane is to visualize a hemisphere with its South Pole sitting FIGURE 1| Representation of the projective plane by a hemisphere at the origin of a Euclidean plane. Any point on the which can be deformed into a crosscap. ordinary Euclidean plane can be represented on the hemisphere by connecting that point to the center of the hemisphere with a straight line. The point where the line meets the hemisphere is the mapping of the point in the Euclidean plane into the hemisphere. Lines from the center of the hemisphere through the equator represent ideal points because they are parallel to the Euclidean plane. As described in Figure 1, antipodal points on the equator of the hemisphere represent the same ideal point and, hence, these points are identified in a topological sense. One can imagine deforming the equator in such a way that antipodal points are joined. See Figure 2 to illustrate this deformation partially completed. In Figure 3, we represent the completion of this FIGURE 2| Partially deformed hemisphere so that antipodal points deformation. This structure is called a crosscap and along the equator are approaching each other. represents a topological model of the projective plane. Figure 4 is a color and shaded rendering of a crosscap. Solving simultaneously, we have (C − C)z = 0. Since we know C − C = 0, ⇒ z = 0. Therefore, NATURAL HOMOGENEOUS (x, y, 0) represents an ideal point. COORDINATES The two-dimensional natural homogeneous coordinate system will be a triple (x, y, z). If z = 0, In ordinary Euclidean space, we have the Cartesian then we have an ideal point. Notice that if the origin, Coordinate system. We wish to develop an analog given by (0, 0) in ordinary Cartesian coordinates, is to Cartesian Coordinates for the projective plane. joined to a point (x, y), again in Cartesian coordinates, Consider the following equations: they determine a line and the ideal point (x, y,0)ison that line. The line has slope y/x. Hence, (x, y,0)isthe + + = Ax By C 0, ideal point corresponding to all lines with slope y/x. = Ax + By + C = 0. For ordinary points, we want z 1sothat the ordinary equation Ax + By + C = 0 holds. Thus These are the ordinary linear equations for two the Cartesian point (x, y) is represented in natural homogeneous coordinates as (x, y, 1). However, if straight lines which are parallel. If we try to solve + + = + + = these equations simultaneously we obtain no solution. Ax By C 0, then also Apx Bpy Cp 0so However in the projective plane we know that the that (px, py, p) is also a valid representation of solution is the ideal point. We rewrite these equations (x, y). We may always rescale so that if we have = x y (x, y, z), z 0, then this is equivalent to z , z ,1 or as x y the Cartesian point z , z . Although this multiple representation for Cartesian points at first appears to Ax + By + Cz = 0, be a handicap, it is indeed a useful representation as Ax + By + C z = 0. we shall see in our later examples. Volume 2, November/December 2010 2010 John Wiley & Sons, Inc. 679 Advanced Review wires.wiley.com/compstats This definition can be extended in the obvious way for higher dimensional projective planes. An equation in xi, u1x1 + u2x2 + u3x3 = 0, is the equation of a line in the projective plane. Notice that the triple, (x1, x2, x3), represents a point. However, the values in the triple, [u1, u2, u3], are the coefficients of the line and hence represent the line. The natural homogeneous coordinates mirror the projective duality between points and lines. Notice that if u1 = u2 = 0, then the equation is satisfied by ideal points. In other words, u3x3 = 0 is the equation of the ideal line, u3 = 0. Definition: The set of all real number triples [u1, u2, u3], ui not all 0, are the natural homogeneous line coordinates in the real projective plane. FIGURE 3| The completely deformed hemisphere with antipodal An equation in ui, u1x1 + u2x2 + u3x3 = 0, is the points identified. In this rendition, 2D view of a 3D structure, the equation of a point in the real projective plane. surfaces penetrate each other. However, embedded in a higher dimensional space these surfaces do not intersect. APPLICATIONS OF NATURAL HOMOGENEOUS COORDINATES Computer Graphics Application I—Representing Translations in Matrix Form In computer graphics applications,3 we are interested in representing translations, rotations, and scalings. Consider the situation with translations. If p = (x, y)T is a point in Cartesian coordinates and it is translated by an amount tx in the x direction and an amount ty T in the y direction, then p = T(p) = (x + tx, y + ty) . T(p) is of course the sum of two vectors, but this oper- ation is not directly translatable into matrix notation. For rotations, consider a point p = (x, y)T which is given in polar coordinates by (r, γ )T. Thus x = r cos(γ )andy = r sin(γ ). If the point is rotated through an angle θ,thenx = r cos(γ + θ)and y = r sin(γ + θ); see Figure 5. But FIGURE 4| Crosscap rendered as a color shaded figure. (Reprinted with permission from Professor Paul Bourke, University of Western cos(γ + θ) = cos(γ )cos(θ) − sin(γ )sin(θ), Australia.