Homogeneous coordinates

From CGAFaq

(Redirected from Homogeneous Coordinates)
Jump to: navigation, search

Contents

Introduction

In short, homogeneous coordinates are a way to assign coordinates to points and vectors in a way that allows one to easily distinguish between them and — what is even more important — to perform all the affine transformations (like translation, rotation, scaling, shearing) just in term of a matrix multiplication.

The homogeneous coordinates of a point are where is any nonzero number. In that sense, they are nonunique. We usually consider the homogeneous coordinates of the form to be the “canonical” ones. On the contrary, a vector has homogeneous coordinates equal . Hence, as we see, the last coordinate distinguishes points from vectors.

In practice, we often store the homogeneous coordinates in the “unmultiplied” form. So is being stored as .

Projective line

To understand the origins of the homogeneous coordinates we have to touch a little of projective geometry. We start from a projective line, since here everything is much simpler.

A projective line is the set of the directions of all the lines on a plane passing through the origin. We denote it by (Warning: this is not the only convention used. Another popular one is to use a post-fix notation so the projective line is . The advocates of each convention can often bring up a number of arguments to support their notation. In reality however both are used, the prefix notation used here seems to be slighly more popular). Now, since every line through the origin must intersect a unit circe in exactly two antipodal points, we can create a model of a projective line by mentally glueing together opposite points of the unit circle. Surprisingly this is again a circle! To see this imagine a circle as a rubber loop. Twist the loop so it makes an eight-shape. Now if we overlap the two loops of the eight-shape, then we effectively glued the antipodal points of the circle.
Enlarge
This in fact is a special case of a more general and very important property of the real projective geometry. Namely, any real projective space can be embedded in the affine space of high enough dimension (in this case in the affine plane). This property is unique to the real case. But the higher dimensional digressions aside, return to our case of the projective line. Having constructed a projective line, we can inject our well known affine line into it. Imagine the unit circle with the center at . Fix the point at the “north pole”. Now the line passing through any given point on the affine line and the fixed point intersects the circe in exactly one more point .
Enlarge
We may thus identify with . This way we identify the whole affine line with the circle missing a single point. This single “missing” point is called the point at infinity. Hence, all in all, we see that the projective line is nothing more than just an affine line with one additional point glueing both its “ends”. In a more fancy terminology, we would say that is the compactification of .

Projective space

We are now ready to generalize our model to higher dimensions. The projective space is the set of the directions of all the lines in the dimensional (!) space passing through the origin. Let’s try to write it symbolically. Every point on a line, but the origin, collapses to a single point in the resulting projective space, so we introduce the equivalence relation such that two point are equivalent if they lie on the same line through the origin. Namely,

for some

Now the projective space is defined as the set off all equivalence classes of this realtion. Hence a point of the projective space is the class of the -tuple with not all null. Any two such tuples and correspond to the same point in the projective space if there is such a nonzero element that

.

Therefore, any point in the projective space is uniquely determined by the ratios of the tuples coresponding to it. To emphasize this we denote a point of a projective space by . These are called projective or homogeneous coordinates of the point.

Similarly as in the case of the projective line, we can embed an affine n-dimesnional space into the projective n-dimensional space. Algebraically, a point of the affine n-dimensional space is an n-tuple, so we need to add one more coordinate, namely we map

.

In fact we could choose any other place to put this 1, all these refer to different covering of a projective space. Of course this embedding is not onto all the points we obtain this way have a non-zero last coordinate (recall that the coordinates are unique only up to their ratios). There are however points in the projective space that have zero as the last coordinate. Those missing points (called points at infinity) make up a projective space of dimension ! Hence, as we have already seen, the projective line is the affine line with one more point. The projective plane is the affine plane with the projective line at infinity, the projective 3-space is the affine 3-space with the projective plane at infinity and so on.

Homogeneous coordinates revisited

Now when we touched the construction of the projective space, we see that the homogeneous coordinates used extensively in computer graphics is nothing all then just assigning the projective (i.e. homogeneous) coordinates to the affine points. Vectors on the other hand are assigned the “unused tuples” (with zero at the end), like the points in infinity in the projectives space. But here the analogy is not full, and should not be push further!

Another approach

We will briefly note, that this is not the only way to introduce homogeneous coordinates. Another option is to utilize a Grassmann space, for details refer to:

  • R. Goldman On the Algebraic and Geometric Foundations of Computer Graphics, ACM Transactions on Graphics, Vol. 21, No. 1, January 2002, Pages 1–35.
Personal tools