Featured Posts

Back Face Detection Algorithm

Back Face Detection Algorithm : 
                                                           Object surface that are oriented away from viewer are called back faces.  Back faces of a polyhedron are completely blocked by polyhedron itself and hidden from view.

         Back face detection algorithm is an example of object space algorithm.  Back face detection is also called back face culling.

        Back face detection algorithm uses the dot product of vectors.  We take two vectors in this algorithm, one vector is taken from viewing direction denoted by V (with arrowhead).

Vector V is normally taken along Z-axis and hence its components are
Vector V
The other vector is taken as normal to the polygon of an object.  The normal is taken as 
Normal vector N
By dot product of these two vectors, we get 
dot product of V and N
In right headed system, the polygon is a back face if

Also we cannot see any face of an object whose normal has Z component C = 0.  In that case

Advantage : This algorithm detects the back face quickly.

Disadvantage : Algorithm unable to detect those faces which are behind the front face and whose normal vector has Z component greater that zero ( i.e C>0).  One such polygon shown below :

Post a Comment


www.posthatke.com. Powered by Blogger.
Copyright © www.posthatke.com | Blogger Templates | Designed By posthatke.com