Outcode Clipping of Triangles
 
For triangles we need merely modify the tests so that all vertices are considered:

  if (outcode1 == 0 &&
      outcode2 == 0 && 
      outcode3 == 0) then
    triangle is inside
  else
    if (outcode1 & outcode2 & outcode3 != 0) then
  	  triangle is outside
    else
  	  don't know
   endif
  endif
		
This form of clipping is not limited to triangles or convex polygons. Is is simple to implement. But it won't handle all of our problems...
Lecture 11   Slide 8   6.837 Fall '01