Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am representing 3D points (vectors) in the following way:

(* conversion from 3D point, represented by normal list of \
coordinates, to matrxi column, suitable for transforms *)
ToColumn[point_] := Transpose[{Append[point, 1]}];

enter image description here

(* conversion from matrix column, representing 3D point, to a list, \
representing the same point *)
ToPoint[column_] := Take[Transpose[column/column[[4, 1]]][[1]], 3];

enter image description here

I.e. forth element serves as the scale factor.

(Is this conventional representation and what is the name of it?)

I am representing perspective transform with the following matrix:

PerspectiveXYZ[{x_, y_, z_}] := {
   {1, 0, 0, 0},
   {0, 1, 0, 0},
   {0, 0, 1, 0},
   {x, y, z, 0}

so that

enter image description here

My question is: what is the sense of transform elements x, y and z?

I drew a cube of 8 points and transformed it with various values of these variables:

enter image description here

And found, that x and y controls projection plane orientation, while z controls both the scale and distance from origin point, while z=1 means projecting into some small region (1?), and that the smaller this value, the bigger is the scale, becoming infinite when z=0.

Is there any clear geometric interpretation of these values, especially z? May be they should be substituted with 1/z or something for better interpretation?

May be my vector model should be changed?

share|improve this question
It's a fact that if you use "homogeneous coordinates" then a perspective (or projective) transformation from a (projective) plane to a (projective) plane can be represented by a $3 \times 3$ "homogeneous" matrix. This is one reason homogeneous coordinates are useful, though they seem unintuitive at first. –  littleO Jun 14 '13 at 10:28
I am using 4x4 matrices. –  Suzan Cioc Jun 14 '13 at 10:36
But warpPerspective accepts a $3 \times 3$ matrix, so why are you using $4 \times 4$ matrices? Also, I don't understand exactly what your question is. –  littleO Jun 14 '13 at 11:51
See my update. 3x3 matrix gives the same result (I think) as 4x4 matrix with 3rd row/column excluded / turned to zero. My question is more general. –  Suzan Cioc Jun 14 '13 at 11:55
Thanks. I'm confused now about why the $4 \times 4$ matrix isn't invertible, I had thought that it should be. Btw, a decent reference for this stuff is the book Multiple View Geometry in Computer Vision by Hartley and Zisserman. –  littleO Jun 14 '13 at 19:43

2 Answers 2

The matrix

enter image description here

defines a perspective projection onto the plane with equation

$Ax + By + Cz + D=0$

Perspective is build with the center in the origin.

share|improve this answer

I would recommend to read a concept of stereohomology. Unfortunately there is no official publication in English yet ( only Chinese research artilces by Z. Chen published on it). See an English version here: on stereohomology

The representation you are using is called homogeneous representation or representation in homogeneous coordinates. In order to understand it, you may need to have some basic knowledge in algebraic projective geometry.

But for only perspective projection in your case, also called central projection, which was defined as singular stereohomology with ordinary stereohomology center $S$ and ordinary stereohomology plane $\pi$, where ordinary means not at infinity in projective space.

Geometric meaning: $S$ is the homogeneous coordinate of the projection center, and $\pi$ is the projection plane; algebraically, $S$ and all the homogeneous cooridinates of points on $\pi$ are eigenvectors to the homogeneous matrix $P$ of the central projection.

There is a simple homogeneous formulation to central projection when the $S = (s1,s2,s3,1)^T$ and the $\pi=(a,b,c,d)^T$:

$$P=I-\dfrac{S\cdot \pi^T}{S^T\cdot \pi}$$

It is easy to verify that $S$ is corresponding to the eigenvalue $0$ with geometric multiplicity of $1$, and points on $\pi$ are associated eigenvectors with the eigenvalue $1$ with geometric multiplicity of $3$.

Generally, given any homogeneous matrix of a central projection, it is easy to obtain all its eigenvalues and the associated eigenvectors via eigendecomposition, and then determine its projection center $S$ and projection image plane $\pi$.

In the last page of this submission to arXiv.org: submission on homogeneous rotations, there is a table illustrating all the possible geometric transformations which are defined as stereohomology.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.