POLYHEDRONNORMALANGLE Compute normal angle at a vertex of a 3D polyhedron.

   THETA = polyhedraNormalAngle(NODES, EDGES, FACES, IND);
   THETA = polyhedraNormalAngle(NODES, FACES, IND);
   where NODES is a set of 3D points, and FACES a set of faces, whose
   elements are indices to NODES array, compute the normal angle at the
   vertex whose index is given by IND.

   THETA = polyhedraNormalAngle(GRAPH, IND);
   Uses a graph structure. GRAPH should contain at least fields : 'nodes'
   and 'faces'.

   Example :
   % create a simple (irregular) tetrahedra
   nodes = [0 0 0;1 0 0;0 1 0;0 0 1];
   faces = [1 2 3;1 2 4;1 3 4;2 3 4];
   % compute normal angle at each vertex
   theta = polyhedronNormalAngle(nodes, faces, 1:size(nodes, 1));
   % sum of normal angles should be equal to 4*pi :
   sum(theta)


   TODO works only for polyhedra with convex faces ! ! !

   See also
   polyhedra, polygon3dNormalAngle

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2005-11-30
 Copyright 2005 INRA - CEPIA Nantes - MIAJ (Jouy-en-Josas).

Package: matgeom