Homogeneous coordinates
From CGAFaq
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 byProjective 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.

