The Geometry of Motion and Perspective

Math 431: Geometry for Computer Graphics

Geometric transformations are of fundamental importance for computer graphics applications. Transformations are used to move graphics about, rotate them, scale them to different sizes, and perform other manipulations.
The "smiley" at the left was assembled using geometric transformations. A circle was defined and filled with color. Then a portion of the bounding circle was rescaled and pulled in toward the center to form the mouth.—a scaling transformation. A standard ellipse was defined in a standard position and filled with black. A scaling transformation was used to resize the ellipse. One transformation moved the resized ellipse to the position of the left eye and another moved the ellipse to the positon of the right eye.( The original ellipse is not used in the final graphic.)
The animation at the right was also constructed using geometric transformations. The car is a graphic centered at the origin of coordinates. For each frame of the animation, the car is rotated to the proper direction and moved to the appropriate point on the race track. The frame is then displayed.
Geometric transformations are best computed in homogeneous coordinates. A graphic is, at bottom, a long list of coordinates specifying points, with some attributes—such as color codes—scattered around. To transform the graphic the transformation must be applied to all the point coordinates. When the point coordinates are homogeneous the geometric transformations have matrix representations and the graphic is moved by performing a series (usually a long series) of matrix multiplications. This fact is so important for graphics applications that machines designed for fast graphics have matrix multiplication built into the hardware.
Homogeneous coordinates live in projective space, and so, for many purposes, projective space is the appropriate setting for graphics computations. Projective space is similar to ordinary space in many ways. It can be regarded as ordinary space with some extra points—ideal points or points at infinity—added. These ideal points can be regarded as directions in space and replace "direction vectors" for many purposes. To accomodate the directions, points in projective space have an "extra" coordinate. A point in the projective plane is specified by a coordinate triple instead of a coordinate pair. Further two different coordinate triples specify the same point if they are proportional. This coordinate ambiguity is the price paid for implementing geometric transformations sing matrix multiplication.
Lines and planes have homogeneous coordinates, often called Plucker coordinates, as well. Plucker coordinates are more efficient (both computationally and in terms of storage) than equations for describing lines and planes. As with points, homogeneous coordinates for lines and planes are transformed by matrix multiplication.
There are two fundamental operations involving points, lines, and planes.These operations, the join and the meet, have elementary formulas in homogeneous coordinates.The (infinitely extended) line in the illustration below is the join of the points P and X. The point Y is the meet of this line and the indicated plane.
The mapping of X to Y in the above sketch is a fundamental graphics operation: projecting a three-dimensional scene to plane for viewing on a computer monitor or artists canvas. The fixed point P is called the center of projection. It is the location of the viewer's eye. Projection transformations have matrix representations in Plucker coordinates, and the join and meet give elementary formulas for these matrices. In fact, the matrices may be computed in integer arithmetic if so desired.
Computations with join and meet are referred to as Peano algebra (other terms are Grassmann algebra and Grassmann-Cayley algebra). Unlike the familiar vector algebra, which works only in three dimensions, Peano algebra works in any dimension. The figure at the left is the projection of a four-dimensional hypercube to three dimensions
Envelopes are the curves that appear when a parametrized family of lines is drawn in the plane. In the figure at the right, each line joins the point on the circle at angle t to the point at angle 2t. The envelope is a cardiod curve.
A set of homogeneous coordinates for a line is called a bivector. When a set of lines is expressed as a parametrized set of bivectors, a parametrization of the envelope is a straightforward computation. This has application to the Bezier design curves used in both CAD/CAM software and freehand drawing programs. In the projective setting, Bezier design curves are an application of the classical theory of conic sections. In the original Cartesian coordinate setting, quadratic Bezier curve segments are sections of parabolas whose precise shapes are determined by the location of three control points. In the projective context, quadratic Bezier curve segments are sections of any conic—ellipse, parabola, hyperbola, circle—with the shape controlled by five control points. This is illustrated at the left.
The points labeled with subscripted P 's above are the control points used for the Cartesian Bezier segment. The Bezier segment, shown in blue, is tangent to all three lines. For the projective segment the position of the subscripted U's may be varied as well. Cubic Bezier segments have four control points in the Cartesian context and seven in the projective context.
The head of the snake at the right was generated by rotating a quadratic Bezier segment through 180 degrees.
It is not possible to define the angle between directions in projective space. However, using a third Peano algebra operation, the dual, it is possible to define perpendicularity. Further, using Plucker coordinates, perpendicular lines and planes are simple to compute. In fact, no arithmetic operations are needed—just index switching and sign changes.
Consider the problem, illustrated at the left, of creating a flat view of a scene located at the origin, O, viewed from the point P. The scene is to be projected to a plane perpendiciular to the line of sight from P to O and containing the chosen point Q. The Peano algebra approach is quite direct. First take the join of P and O to obtain the red line. Then use the dual operation to find the projection plane—the plane perpendicular to the line of sight through the point Q.
Assuming that the z-axis points "up", find the vertical axis in the projection plane by taking the join of P and the z-axis and meeting the resulting plane with the projection plane. For the horizontal axis in the projection plane, take the line through Q perpendicular to the Pz-plane.
Projective space, however, is not adequate for the animation at the right. The animation consists of two oppositely colored checked patterns that have been cut or clipped along a straight line. The left half of one pattern is then mated with the right half of the other and the result is displayed.
The problem is that projective space curves around on itself in a way difficult to visualize and, as a result, a straight line does not divide the projective plane into two disjoint halves. The left and right sides of a line in the projective plane, or of a plane in projective space, are not well defined—that is to say, computable—concepts.
The checkerboard animation uses the idea of two-sided projective space. In projective space we ignore multiples of sets of homogeneous coordinates. In two-sided projective space we ignore positive multiples of sets of homogenous coordinates but condsider two sets of coordinates different if one is a negative multiple of the other. Two sided projective space is projective space with a little added structure. Planes have positive and negative sides and lines have directions. This added structure is enough to support clipping.
The added structure also supports computation of angles. In two-sided projective space we can compute the angle from one direction to another, whereas in ordinary projective space we can only check for perpendicularity.
Once we have angles we have rotations. In higher dimensions rotations have axes.
Notice that the glider flying around the Washington monuments above simultaneously rotates around several axes in a complex way.
Peano algebra allows us to define rotations in all dimensions. The animation below is a projection to three dimensions of a four-dimensional hypercube rotating about the axis containing the dots, which are located at four vertices and the center of the hypercube. (In four dimensions the axis of a rotation is a plane.)
The name Peano Algebra is due to M. Barnabei, A. Brini, and G.-C. Rota. The methods were first developed by Hermann Grassmann in the mid-ninteenth century and Giuseppe Peano in the late nineteenth century. The methods were cast in their current form by Gian-Carlo Rota and a series of collaborators in the 1970s. They did so in the context of invariant theory. Motivated by computer graphics problems, two-sided, or oriented, projective geometry was developed by Jorge Stolfi in the late 1980s. He used synthetic methods rather than Peano algebra.
Math 431 Lecture Notes