Projective transformations

431 Views Asked by At

I am studying computer aided geometry and I have a background in mathematics. For me a (real) projective transformation is a map $f: \mathbb{RP}^n \to \mathbb{RP}^n $ induced by a linear isomorphism $F: \mathbb{R}^{n+1} \to \mathbb{R}^{n+1}$ since being injective it maps lines to lines (m-subspaces to m-subspaces). In the context of graphic design they usually never propey define projective maps, they usually project something onto a plane or use the following construction:

Given $(x, y, z) \in \mathbb{R}^3$ we consider the point $(x, y, z,1) \in \mathbb{R}^4$ (i.e. a copy of $\mathbb{R}^3$ on the affine hyperplane $\{w=1\}$, then we apply a bijective linear map on $\mathbb{R}^4$ and project the image back on the hyperplane (which causes some trouble if the image has forth coordinate equal to zero). This process on $\mathbb{R}^3$ is called a projective map. What is the link with my definition? I am sure it might involve considering homogeneous coordinates $(x, y, z) \to [x : y : z : 1]$, anyhow I don't get why the confused notation, they seem different things.

1

There are 1 best solutions below

2
On

The $1$ is an artifact of homogenous coordinates and makes sure that your vectors are normalized with respect to that coordinate. The $1$ should never be zero, or anything else for that matter. This is because the augmented matrix form of an affine transformation takes advantage of this for computational reasons and should be normalized at every step to ensure that the $1$ is always there. The OpenGL transformation object is a $4 \times 4$ matrix for this reason. Even if you're not working in OpenGL directly your API probably has this transform object implemented.

One advantage is that you can now do vector addition with matrix multiplication allowing you to encode the matrix and the vector it acts on within the same matrix. Another advantage is for the perspective projection which requires homogenous coordinates to do correctly. It's actually the perspective projection that motivated the study of projective spaces, and gave them their name. You can vaguely see how vanishing points have something to do with lines through the origin but you can make this idea more precise by studying the viewing frustum.

Finally the OpenGL transform allows you to encode transformation and positional data in a single matrix. This is really useful when drawing objects relative to some other object, such as an arm with two joints. You want each joint to act independently but stay connected so one part will need position and transform information about the other to draw correctly. The affine transform matrix representing where each part of the arm is in relation to the joints will simply reduce to this matrix multiplication.