Polygon:

Path: Common/Graphics

% Generate the properties for a polygon given vertices in the form v(3,n).
 It assumes that the polygon is planar. It computes an average normal
 at all vertices. 
--------------------------------------------------------------------------
   Form:
   [area, n, r] = Polygon( v )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   v          (3,:)       Vertices

   -------
   Outputs
   -------
   area       (1,1)       Area of the polygon
   n          (3,1)       Normal
   r          (3,1)       Geometric center

--------------------------------------------------------------------------
   Reference: Hill, F.S., Jr. Computer Graphics.
--------------------------------------------------------------------------

Children:

Math: Linear/Cross
Math: Linear/DupVect

Back to the Common Module page