Affine spaces & projective geometry

What would happen if we took \mathbb {R}^{3} and pretended that we didn’t know where it’s origin was? One of the ramifications would be that points and vectors in that space would have to be considered different entities. When the origin O is fixed and we know it any point P in the space can be represented as the vector OP. This means that when we are working in an affine space (any point can be the origin), points are regarded as fixed locations in space and vectors are regarded as displacements without an origin — two different things.

Formally, an affine space consists of a vector space V and a set of points P such that:

  • if p_1,p_2 \in P then p_1-p_2 \in V
  • if p \in P and v \in V then v+p \in P

So, to specify an affine space we need a basis v_1,v_2 for V (suppose it’s the image plane) and a point p \in P to act as the “unknown” origin. v_1, v_2, p becomes the reference frame of the affine space. As usual, every vector in the affine space can be expressed as {c_1}{v_1}+{c_2}{v_2}+0p, while points are expressed as {a_1}{v_1}+{a_2}{v_2}+1p. In other words, vectors are of the form (c_1, c_2, 0) while points are of the form (a_1, a_2, 1).

Does this remind you of anything? Yup, homogeneous coordinates. I believe this is why my lecture notes mentioned that “(X,Y,Z) is interpreted as a line (vector, horizon) when Z=0 and as a point when Z=1.” It makes much more sense now then back when I first looked at that black magic of a sentence.

OK, so far so good. What really confuses me now, and confused some of my friends when they took the graphics course at UofT, is the question of why is it necessary to use affine spaces & homogeneous coordinates (and thus differentiate between points and vectors) in computer graphics? Why can’t we use our good old euclidean geometry? I believe the answer has to do with the types of transformations that euclidean geometry allows: only rigid-body transformations (i.e. identity, translations and rotations) are allowed and they preserve distances and angles.

Which classes of transformations are missing from that list and might be very useful in computer graphics? Linear transformations (e.g. scaling, reflection and shear), affine transformations (they preserve parallel lines) and projective transformations (artistic perspective). For instance, euclidean geometry says that two parallel lines never meet thus failing to describe perspective and the vanishing point on the horizon:

Projective geometry allows projective transformations such as the above. Euclidean geometry is a subset of affine and that in turn is a subset of projective, with respect to the classes of transformations each one includes. So, I presume that the answer to my question  is that in computer graphics people use projective geometry because it makes the end result much more realistic.

Some links to whet your appetite: #1, #2, #3, #4, #5, #6, #7

Advertisements
Affine spaces & projective geometry

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s