Understanding perspective transform matrix elements interpretation

1.5k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.