Combining Perspective and Parallel Projections
There is a simple strategy that allows both parallel and perspective clipping to be done with the same clipping algorithm.
The idea is to map the perspective canonical view volume into the parallel one.
The perspective view volume (after transformation Nper) is a pyramid centered along the -3 axis, with its apex at the origin and its base, the back clipping plane, at z = -1. The front clipping plane is a square at a position zmin on the 3 axis. We can compute zmin from the fact that it is at point VRP''3 + F before shearing and scaling (ie just after we translate the COP to the origin). Shearing will not affect this z position and scaling scales it by the third dimensional scale factor. Thus
zmin = -(VRP''3 + F)/(VRP''3+B).
It is easily checked that the matrix:
Mperpar = 1 0 0 0 0 1 0 0 0 0 1/(1+zmin) -zmin/(1+zmin) 0 0 -1 0
takes this view volume into the 2x2x1 rectangular volume for the parallel method. The COP is moved from the origin to +infinity on the 3-axis and so it appears as if the z-axis is the DOP for a parallel transformation.
Thus by using the perspective transformation:
Nperpar = Mperpar * Nper = Mperpar * Sper*SHper*Tcop*R*Tvrp
the perspective case will result in clipping in the same volume as for the parallel case. In this case the final projection, applied after clipping, is Mpar rather than Mper - i.e. just drop the 3rd coordinate of each point.