For an object, determine the point of view and orientation
![]() |
![]() |
![]() |
For several objects, determine their position with respect to each other:
![]() |
![]() |
![]() |
Detection algorithms:

Consider the normal to a surface N and the view vector V. If angle(V, N) < 90, then the face is a back face.
In the case where the projection is on the (0xy) plane, if the z component of the normal, Nz > 0, then the face is hidden.
Only works if the object is closed. Can be used to preprocess the scene.
![]() |
![]() |
For each pixel (x,y) in the projection plane, keep the value of the closest z value that has been drawn on it.
1. Initialize the projection area to a background color.
2. Initialize the z-buffer to a maximal number (back clipping plane).
3. Scan-convert one polygon (triangle) at a time. For each converted
point, compare its z with the value stored for that pixel in the z-buffer.
If the new value is smaller, draw the point.
For each pixel record all the scan-converted points, with depth and opacity parameter.
Compute the color of the pixel based on all this information.

color(P) = a2 * color(P2) + (1-a2) (a1*color(P1) + (1-a1) (a3*color(P3)
+ (1-a3)*background))
= 0.8 c2 + 0.2 (0.3 c1 + 0.7 (0.5 c3 + 0.5 bcgr)
= 0.8 c2 + 0.06 c1 + 0.065 c3 + 0.065 bcgr
Disable the z-buffer:
glDisable(GL_DEPTH_TEST);
Clear the z-buffer:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);