Version 1 (modified by martin, 7 years ago)

--

Perspective Transformation is performed by a 4 by 4 matrix with elements in the final column:

 Mpersp =  1        0       0       0
               =  0        1       0       0
               =  0        0       1       1/d
               =  0        0       0       0

then [xyz1].Mpersp = [x,y,z,z/d] and as the w coordinate is effectively a scaling factor, items which are further away from the eye are 'shrunk' on the screen pixels. The red book gives a full description of the viewing transforms.