Clip Space Approach – Extracting the Planes
| Prev: Source Code | Next: Implementation Details |
In here another approach to extract the view frustum planes is presented based on the properties of clip space.
Consider a point p =(x,y,z,1) on the 3D world. Consider also a modelview matrix M and a projection matrix P. The point p is transformed by matrices M and P as point pc =(xc,yc,zc,wc) in clip space using:
The point pc is in homogeneous coordinates, and when normalised becomes pcn:
In normalised clip space the view frustum is an axis aligned box centered in the origin, and bounded by the following planes:
- Left Plane: x’ = -1
- Right Plane: x’ = 1
- Top Plane: y’ = 1
- Bottom Plane: y’ = -1
- Near Plane: z’ = -1
- Far Plane: z’ = 1
This implies that the point pcn =(x’,y’,z’) is inside the view frustum if:
Then the point pc, in non-normalized coordinates, must obbey the following conditions in order to be inside the view frustum:
Based on this information it is possible to extract the six planes, in world coordinates, that bound the view frustum. The point pc is on the “right” side of the left plane if
Consider p and A=MP as described below

Then xc and wc can be defined as a function of p = (x,y,z,w), and A.
Therefore the following inequation must be true if p is on the right side of the left plane.
A little algebraic manipulation gives
![]()
So the left plane (Ax+By+Cz+D=0) is defined as:
where col1 and col4 are the first and forth columns of matrix A, respectively.
If the only objective is to find out if a point is inside or outside of the frustum then the plane as defined is ok. However when testing spheres, which require computing the distance from the center of the sphere to the plane, it is advisable to normalize the plane.
The right plane can be obtained in a similar manner:
The following coefficients are obtained for the right plane:

The remaining planes are obtained as follows:
| Prev: Source Code | Next: Implementation Details |








