CLIPPOLYGON3DHP clip a 3D polygon with Half-space.

   usage
   POLY2 = clipPolygon3dHP(POLY, PLANE)
   POLY is a [Nx3] array of points, and PLANE is given as :
   [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2].
   The result POLY2 is also an array of 3d points, sometimes smaller than
   poly, and that can be [0x3] (empty polygon).

   POLY2 = clipPolygon3dHP(POLY, PT0, NORMAL)
   uses plane with normal NORMAL and containing point PT0.

   TODO: not yet implemented

   There is a problem for non-convex polygons, as they can be clipped in
   several polygons. Possible solutions:
   * create another function 'clipConvexPolygon3dPlane' or
       'clipConvexPolygon3d', using a simplified algorithm
   * returns a list of polygons instead of a single polygon,
   * in the case of one polygon as return decide what to return
   * and rename this function to 'clipPolygon3d'

   See also:
   poygons3d, polyhedra, clipConvexPolygon3dHP

   ---------

   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 02/08/2005.

Package: matgeom