Homogeneous Coordinates for Computer Graphics
Doug Baldwin
Dept. of Mathematics, SUNY Geneseo
Last modified September 28, 2021
“Homogeneous coordinates” are a convention from geometry (specifically so-called “projective” geometry) for identifying points in space. Homogeneous coordinates also turn out to be very useful tool for computer graphics. This document introduces homogeneous coordinates as defined in mathematics, and then explores their uses in computer graphics.
Homogeneous Coordinates in Mathematics
Imagine lying on your back and looking up at the night sky, as in Figure 1. From your point of view, the sky is a vast plane above you, and the stars appear to be points of light on that plane.

Figure 1. The night sky as a plane punctuated by stars
Of course, the stars aren’t really points in the sky plane, they are points
scattered through 3-dimensional space. What you see are the “projections”
of the stars onto the sky plane. Adding a coordinate system with its origin at your
eye, as in Figure 2, provides some vocabulary to talk about
these projections. In particular, your view of a star whose actual position is

Figure 2. A star with actual position
Notice that many different points project onto the sky plane at
Homogeneous coordinates are a way of describing points in some lower number
of dimensions in terms of the points that project to them from some higher number of
dimensions. In the night sky example, this means describing points in the sky by
points on the lines that project to them. In particular, assume that
Homogeneous coordinates have lots of applications in the geometry of projections and
their relationships to the things they are projections of, but those applications are
generally beyond the scope of this introduction. One consequence of homogeneous
representations does bear mention before turning to their use in computer graphics
though: if the homogeneous form
Homogeneous Coordinates in Computer Graphics
Homogeneous coordinates are used in one of two ways in computer graphics. The most
widespread is a restricted form, in which the “extra” coordinate (i.e.,
the third in two dimensions or the fourth in three) can only take on the values
The restricted form of homogeneous coordinate is valuable in computer graphics because it solves a problem in representing and implementing transformations of geometric objects. In particular, most of computer graphics’s important geometric transformations can be represented by matrices, and can be applied to points or vectors in Cartesian form by treating the point or vector as a column vector and multiplying it by the transformation’s matrix. This claim is true of rotations and dilations, and it makes applying those transformations fast and easy because matrix-vector multiplication is well understood and lends itself to full or partial implementation directly in computer hardware. However, the third major transformation in computer graphics, translation, cannot be represented as matrix multiplication in Cartesian coordinates. It can, however, in homogeneous coordinates.
In particular, let a point
With these homogeneous representations of points and vectors, a translation by
Multiplying a point in column form by this matrix, i.e.,
produces the translated point, namely
as it should. Similarly, multiplying a translation and a vector produces the original vector. This is again the correct result, since vectors do not have positions and thus should be unaffected by translations:
For transformations that can already be represented by matrices operating on Cartesian coordinates, there is a simple translation to matrices for homogeneous coordinates: if
represents a transformation in Cartesian coordinates, then
represents the same transformation in homogeneous coordinates, i.e., a
transformation that when applied to a homogeneous representation of point
Exercises
1. Verify that the matrix