# doc-cache created by Octave 4.4.1
# name: cache
# type: cell
# rows: 3
# columns: 59
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
boxToMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 826
 BOXTOMESH Convert a box into a quad mesh with the same size

   [V E F] = boxToMesh(BOX) 
   Create a box as a polyhedra representation. The box is defined by its  
   coordinate extents: BOX = [XMIN XMAX YMIN YMAX ZMIN ZMAX] 
   The result has the form [V E F], where V is a 8-by-3 array with vertex
   coordinates, E is a 12-by-2 array containing indices of neighbour
   vertices, and F is a 6-by-4 array containing vertices array of each
   face.

   [V F] = boxToMesh(BOX)
   Returns only the vertices and the face vertex indices.

   MESH = boxToMesh(BOX)
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.
   
   ... = boxToMesh()
   Creates a unit cube

   Example
   [v, f] = boxToMesh([-2 -1 0 pi 2 3])
   drawMesh(v, f);
   
   See also
   meshes3d, drawMesh, triangulateFaces



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
 BOXTOMESH Convert a box into a quad mesh with the same size



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
checkMeshAdjacentFaces


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 878
CHECKMESHADJACENTFACES Check if adjacent faces of a mesh have similar orientation

   checkMeshAdjacentFaces(VERTICES, EDGES, FACES)
   The functions returns no output, but if two faces share a common edge
   with the same direction (meaning that adjacent faces have normals in
   opposite direction), a warning is displayed. 
   
   Example
   [v e f] = createCube();
   checkMeshAdjacentFaces(v, e, f);
   % no output -> all faces have normal outwards of the cube

   v = [0 0 0; 10 0 0; 0 10 0; 10 10 0];
   e = [1 2;1 3;2 3;2 4;3 4];
   f = [1 2 3; 2 3 4];
   checkMeshAdjacentFaces(v, e, f);
      Warning: Faces 1 and 2 run through the edge 3 (2-3) in the same direction

   See also
   meshes3d

 ------
 Author: David Legland
 e-mail: david.legland@grignon.inra.fr
 Created: 2010-10-06,    using Matlab 7.9.0.529 (R2009b)
 Copyright 2010 INRA - Cepia Software Platform.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
CHECKMESHADJACENTFACES Check if adjacent faces of a mesh have similar orientatio



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
clipConvexPolyhedronHP


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 561
CLIPCONVEXPOLYHEDRONHP Clip a convex polyhedron by a plane

   [NODES2, FACES2] = clipConvexPolyhedronHP(NODES, FACES, PLANE)

   return the new (convex) polyhedron whose vertices are 'below' the
   specified plane, and with faces clipped accordingly. NODES2 contains
   clipped vertices and new created vertices, FACES2 contains references
   to NODES2 vertices.

   Example
   [N E F] = createCube;
   P = createPlane([.5 .5 .5], [1 1 1]);
   [N2 F2] = clipConvexPolyhedronHP(N, F, P);
   drawPolyhedra(N2, F2);

   See also
   meshes3d, polyhedra, planes3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
CLIPCONVEXPOLYHEDRONHP Clip a convex polyhedron by a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
clipMeshVertices


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 598
CLIPMESHVERTICES Clip vertices of a surfacic mesh and remove outer faces

   [V2, F2] = clipMeshVertices(V, F, B)
   Clip a mesh represented by vertex array V and face array F, with the
   box represented by B. The result is the set of vertices contained in
   the box, and a new set of faces corresponding to original faces with
   all vertices within the box.

   Example
     [v, f] = createSoccerBall;
     box = [-.8 2 -.8 2 -.8 2];
     [v2, f2] = clipMeshVertices(v, f, box);
     figure; drawMesh(v2, f2, 'faceAlpha', .7); 
     view(3); axis equal;

   See also
   meshes3d, clipPoints3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
CLIPMESHVERTICES Clip vertices of a surfacic mesh and remove outer faces



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
createCube


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 885
 -- Function File: [V,E,F] = createCube ()
 -- Function File: [V,F] = createCube ()
 -- Function File: MESH = createCube ()
     Create a 3D mesh representing the unit cube

     [V E F] = createCube Create a unit cube, as a polyhedra
     representation.  c has the form [V E F], where V is a 8-by-3 array
     with vertices coordinates, E is a 12-by-2 array containing indices
     of neighbour vertices, and F is a 6-by-4 array containing vertices
     array of each face.

     [V F] = createCube; Returns only the vertices and the face vertex
     indices.

     MESH = createCube; Returns the data as a mesh structure, with
     fields 'vertices', 'edges' and 'faces'.

     Example
          [n e f] = createCube;
          drawMesh(n, f);

     See also: meshes3d, drawMesh, createOctahedron, createTetrahedron,
     createDodecahedron, createIcosahedron, createCubeOctahedron.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Create a 3D mesh representing the unit cube



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
createCubeOctahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 723
 -- Function File: [V, E, F] = createCubeOctahedron ()
 -- Function File: MESH = createCubeOctahedron ()
     Create a 3D mesh representing a cube-octahedron

     [V E F] = createCubeOctahedron; Cubeoctahedron can be seen either
     as a truncated cube, or as a truncated octahedron.  V is the
     12-by-3 array of vertex coordinates E is the 27-by-2 array of edge
     vertex indices F is the 1-by-14 cell array of face vertex indices

     [V F] = createCubeOctahedron; Returns only the vertices and the
     face vertex indices.

     MESH = createCubeOctahedron; Returns the data as a mesh structure,
     with fields 'vertices', 'edges' and 'faces'.

     See also: meshes3d, drawMesh, createCube, createOctahedron.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
Create a 3D mesh representing a cube-octahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
createDodecahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 837
CREATEDODECAHEDRON Create a 3D mesh representing a dodecahedron

   [V, E, F] = createDodecahedron;
   Create a 3D mesh representing a dodecahedron
   V is the 20-by-3 array of vertex coordinates
   E is the 30-by-2 array of edge vertex indices
   F is the 12-by-5 array of face vertex indices

   [V, F] = createDodecahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createDodecahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Example
   [v, e, f] = createDodecahedron;
   drawMesh(v, f);

   Use values given by P. Bourke, see:
   http://local.wasp.uwa.edu.au/~pbourke/geometry/platonic/
   faces are re-oriented to have normals pointing outwards.

   See also
   meshes3d, drawMesh
   createCube, createOctahedron, createIcosahedron, createTetrahedron




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
CREATEDODECAHEDRON Create a 3D mesh representing a dodecahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
createDurerPolyhedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1452
CREATEDURERPOLYHEDRON  Create a mesh representing Durer's polyhedron 

   [V, F] = createDurerPolyhedron
   [V, E, F] = createDurerPolyhedron
   Returns a mesh data structure that represents Durer's polyhedron shown
   in "Melancholia". Vertices are stored in V as Nv-by-3 array of 3D
   coordinates, faces are stored in Nf-by-1 cell array containing the
   vertex indices of each face.
   Several hypotheses exist on the exact geometry of the solid. The one
   described in Mathworld (see references) is used here.

   Durer's polyhedron is generated from a centered unit cube. Several
   transforms are applied succesively:
   * Rotation around Oz by PI / 4
   * Rotation around Oy by asec(sqrt(3))
   * z-scaling by sqrt(1 + 3 / sqrt(5) )
   * truncation by two horizontal planes located at a distance of 
       (3 - sqrt(5)) / 2 from each azimutal vertex.

   Durer's polyhedron is composed of six pentagonal faces and 2 triangular
   faces. Pentagonal faces have angles 126, 108, 72, 108, and 126 degrees.
   triangular faces are equilateral.

   Example
     % Display Durer's polyhedron 
     [v f] = createDurerPolyhedron;
     figure; hold on; set(gcf, 'renderer', 'opengl');
     drawMesh(v, f, 'FaceColor', [.7 .7 .7]);
     axis equal; axis([-1 1 -1 1 -1 1]);
     view(3)

   See also
     meshes3d, createCube, createOctahedron

   References
   http://mathworld.wolfram.com/DuerersSolid.html
   http://en.wikipedia.org/wiki/Drer_graph



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
CREATEDURERPOLYHEDRON  Create a mesh representing Durer's polyhedron 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
createIcosahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 621
CREATEICOSAHEDRON Create a 3D mesh representing an Icosahedron.

   MESH = createIcosahedron;
   [V, E, F] = createIcosahedron;
   Create a solid with 12 vertices, and 20 triangular faces. Faces are
   oriented outwards of the mesh.

   [V, F] = createIcosahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createIcosahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Example
     [n, e, f] = createIcosahedron;
     drawMesh(n, f);
   
   See also
   meshes3d, drawMesh
   createCube, createOctahedron, createDodecahedron, createTetrahedron




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
CREATEICOSAHEDRON Create a 3D mesh representing an Icosahedron.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
createMengerSponge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 310
CREATEMENGERSPONGE Create a cube with an inside cross removed

   [n, e, f] = createMengerSponge;
   Main use is to test possibility of drawing polyhedra with complex faces
   (polygonal faces with holes)

   Example
   [n, e, f] = createMengerSponge;
   drawMesh(n, f);
   
   See also
   meshes3d, drawMesh




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
CREATEMENGERSPONGE Create a cube with an inside cross removed



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
createOctahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1056
CREATEOCTAHEDRON Create a 3D mesh representing an octahedron

   [V, E, F] = createOctahedron;
   Create a 3D mesh representing an octahedron
   V is a 6-by-3 array with vertices coordinate, E is a 12-by-2 array
   containing indices of neighbour vertices, and F is a 8-by-3 array
   containing array of vertex index for each face.

   [V, F] = createOctahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createOctahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Vertices are located on grid vertices:
    ( 1,  0,  0 )
    (  0, 1,  0 )
    (  0,  0, 1 )

   Edge length of returned octahedron is sqrt(2).
   Surface area of octahedron is 2*sqrt(3)*a^2, approximately 6.9282 in
   this case.
   Volume of octahedron is sqrt(2)/3*a^3, approximately 1.3333 in this
   case.

   Example
     [v, e, f] = createOctahedron;
     drawMesh(v, f);

   See also
   meshes3d, drawMesh
   createCube, createIcosahedron, createDodecahedron, createTetrahedron
   createCubeOctahedron




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
CREATEOCTAHEDRON Create a 3D mesh representing an octahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
createRhombododecahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 626
CREATERHOMBODODECAHEDRON Create a 3D mesh representing a rhombododecahedron

   [V, E, F] = createRhombododecahedron
   V is a 14-by-3 array with vertex coordinate, 
   E is a 12-by-2 array containing indices of neighbour vertices,
   F is a 8-by-3 array containing vertices array of each face.

   [V, F] = createRhombododecahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createRhombododecahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Example
   [v, e, f] = createRhombododecahedron;
   drawMesh(v, f);


   See also
   meshes3d, drawMesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
CREATERHOMBODODECAHEDRON Create a 3D mesh representing a rhombododecahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
createSoccerBall


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 509
CREATESOCCERBALL Create a 3D mesh representing a soccer ball

   It is basically a wrapper of the 'bucky' function in matlab.
   [V, E, F] = createSoccerBall
   return vertices, edges and faces that constitute a soccerball
   V is a 60-by-3 array containing vertex coordinates
   E is a 90-by-2 array containing indices of neighbor vertices
   F is a 32-by-1 cell array containing vertex indices of each face
   Example
   [v, f] = createSoccerBall;
   drawMesh(v, f);

   See also
   meshes, drawMesh, bucky



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
CREATESOCCERBALL Create a 3D mesh representing a soccer ball



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
createTetrahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 801
CREATETETRAHEDRON Create a 3D mesh representing a tetrahedron

   [V, E, F] = createTetrahedron
   create a simple tetrahedron, using mesh representation. The tetrahedron
   is inscribed in the unit cube.
   V is a 4-by-3 array with vertex coordinates, 
   E is a 6-by-2 array containing indices of neighbour vertices,
   F is a 4-by-3 array containing vertices array of each (triangular) face.

   [V, F] = createTetrahedron;
   Returns only the vertices and the faces.

   MESH = createTetrahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.


   Example
   % Create and display a tetrahedron
   [V, E, F] = createTetrahedron;
   drawMesh(V, F);

   See also 
   meshes3d, drawMesh
   createCube, createOctahedron, createDodecahedron, createIcosahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
CREATETETRAHEDRON Create a 3D mesh representing a tetrahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
createTetrakaidecahedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 818
CREATETETRAKAIDECAHEDRON Create a 3D mesh representing a tetrakaidecahedron

   [V, E, F] = createTetrakaidecahedron;
   Create a mesh structure representing a tetrakaidecahedron, composed of
   both square and hexagonal faces. Tetrakaidecahedron can be used to tile
   the 3D Euclidean space.

   V is a 24-by-3 array with vertex coordinates,
   E is a 36-by-2 array containing indices of neighbour vertices,
   F is a 14-by-1 cell array containing vertex indices array of each face.

   [V, F] = createTetrakaidecahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createTetrakaidecahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Example
   [n, e, f] = createTetrakaidecahedron;
   drawMesh(n, f);
   
   See also
   meshes3d, drawMesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
CREATETETRAKAIDECAHEDRON Create a 3D mesh representing a tetrakaidecahedron



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
cylinderMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 940
CYLINDERMESH  Create a 3D mesh representing a cylinder

   [V F] = cylinderMesh(CYL)
   Computes vertex coordinates and face vertex indices of a mesh
   representing a 3D cylinder given as [X1 Y1 Z1 X2 Y2 Z2 R].

   Example
     % Draw a rotated cylinder
     cyl = [0 0 0 10 20 30 5];
     [v f] = cylinderMesh(cyl);
     figure;drawMesh(v, f, 'FaceColor', 'r');
     view(3); axis equal;

     % Draw three mutually intersecting cylinders
       p0 = [30 30 30];
       p1 = [90 30 30];
       p2 = [30 90 30];
       p3 = [30 30 90];
       [v1 f1] = cylinderMesh([p0 p1 25]);
       [v2 f2] = cylinderMesh([p0 p2 25]);
       [v3 f3] = cylinderMesh([p0 p3 25]);
       figure; hold on;
       drawMesh(v1, f1, 'FaceColor', 'r');
       drawMesh(v2, f2, 'FaceColor', 'g');
       drawMesh(v3, f3, 'FaceColor', 'b');
       view(3); axis equal
       set(gcf, 'renderer', 'opengl')
  
   See also
     drawCylinder, torusMesh, sphereMesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
CYLINDERMESH  Create a 3D mesh representing a cylinder



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
drawFaceNormals


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 497
DRAWFACENORMALS Draw normal vector of each face in a mesh

   drawFaceNormals(V, E, F)
   Compute and draw the face normals of the mesh defined by vertices V,
   edges E and faces F. See meshes3d for format of each argument.

   H = drawFaceNormals(...)
   Return handle array to the created objects.

   Example
   % draw face normals of a cube
     drawMesh(v, f)
     axis([-1 2 -1 2 -1 2]);
     hold on
     drawFaceNormals(v, e, f)

   See also
   meshes3d, drawMesh, drawVector3d, quiver3




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
DRAWFACENORMALS Draw normal vector of each face in a mesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
drawMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1346
 -- Function File: H = drawMesh (VERTICES, FACES)
 -- Function File: H = drawMesh (MESH)
 -- Function File: H = drawMesh (..., COLOR)
 -- Function File: H = drawMesh (..., NAME,VALUE)
     Draw a 3D mesh defined by vertices and faces

     drawMesh(VERTICES, FACES) Draws the 3D mesh defined by vertices
     VERTICES and the faces FACES. vertices is a [NVx3] array containing
     coordinates of vertices, and FACES is either a [NFx3] or [NFx4]
     array containing indices of vertices of the triangular or
     rectangular faces.  FACES can also be a cell array, in the content
     of each cell is an array of indices to the vertices of the current
     face.  Faces can have different number of vertices.

     drawMesh(MESH) Where mesh is a structure with fields 'vertices' and
     'faces', draws the given mesh.

     drawMesh(..., COLOR) Use the specified color to render the mesh
     faces.

     drawMesh(..., NAME, VALUE) Use one or several pairs of parameter
     name/value to specify drawing options.  Options are the same as the
     'patch' function.

     H = drawMesh(...); Also returns a handle to the created patch.

     WARNING: This function doesn't work with gnuplot (as of version
     4.2)

     Example:
              [v f] = createSoccerBall;
              drawMesh(v, f);

     See also: polyhedra, meshes3d, patch.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Draw a 3D mesh defined by vertices and faces



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawPolyhedron


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 824
DRAWPOLYHEDRON Draw polyhedron defined by vertices and faces

   drawPolyhedron(NODES, FACES)
   Draws the polyhedron defined by vertices NODES and the faces FACES. 
   NODES is a NV-by-3 array containing coordinates of vertices, and FACES
   is either a NF-by3 or NF-by-4 array containing indices of vertices of
   the triangular or rectangular faces.
   FACES can also be a cell array, in the content of each cell is an array
   of indices to the nodes of the current face. Faces can have different
   number of vertices.
   
   H = drawPolyhedron(...);
   Also returns a handle to the created patche.

   Example:
   [n f] = createSoccerBall;
   drawPolyhedron(n, f);

   See also:
   polyhedra, drawMesh, drawPolygon

   ---------

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




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
DRAWPOLYHEDRON Draw polyhedron defined by vertices and faces



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
ellipsoidMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 431
ELLIPSOIDMESH Convert a 3D ellipsoid to face-vertex mesh representation

   [V, F] = ellipsoidMesh(ELLI)
   ELLI is given by:
   [XC YC ZC  A B C  PHI THETA PSI],
   where (XC, YC, ZC) is the ellipsoid center, A, B and C are the half
   lengths of the ellipsoid main axes, and PHI THETA PSI are Euler angles
   representing ellipsoid orientation, in degrees.


   See also
   meshes3d, drawEllipsoid, sphereMesh, inertiaEllipsoid




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
ELLIPSOIDMESH Convert a 3D ellipsoid to face-vertex mesh representation



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
faceCentroids


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 778
FACECENTROIDS Compute centroids of a mesh faces

   NORMALS = faceCentroids(VERTICES, FACES)
   VERTICES is a set of 3D points  (as a N-by-3 array), and FACES is
   either a N-by-3 index array or a cell array of indices. The function
   computes the centroid of each face, and returns a Nf-by-3 array
   containing their coordinates.

   Example
     [v e f] = createIcosahedron;
     normals1 = faceNormal(v, f);
     centros1 = faceCentroids(v, f);
     figure; drawMesh(v, f); 
     hold on; axis equal; view(3);
     drawVector3d(centros1, normals1);


   See also:
   meshes3d, drawMesh, faceNormal, convhull, convhulln


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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
FACECENTROIDS Compute centroids of a mesh faces



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
faceNormal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 797
FACENORMAL Compute normal vector of faces in a 3D mesh

   NORMALS = faceNormal(VERTICES, FACES)
   VERTICES is a set of 3D points (as a N-by-3 array), and FACES is either
   a N-by-3 index array or a cell array of indices. The function computes
   the normal vector of each face.
   The orientation of the normal is defined by the sign of cross product
   between vectors joining vertices 1 to 2 and 1 to 3.


   Example
     [v e f] = createIcosahedron;
     normals1 = faceNormal(v, f);
     centros1 = faceCentroids(v, f);
     figure; drawMesh(v, f); 
     hold on; axis equal; view(3);
     drawVector3d(centros1, normals1);

     pts = rand(50, 3);
     hull = minConvexHull(pts);
     normals2 = faceNormal(pts, hull);

   See also
   meshes3d, drawMesh, convhull, convhulln, drawVector3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
FACENORMAL Compute normal vector of faces in a 3D mesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
intersectLineMesh3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 747
INTERSECTLINEMESH3D Intersection points of a 3D line with a mesh

   INTERS = intersectLineMesh3d(LINE, VERTICES, FACES)
   Compute the intersection points between a 3D line and a 3D mesh defined
   by vertices and faces.

   [INTERS, POS, INDS] = intersectLineMesh3d(LINE, VERTICES, FACES)
   Also returns the position of each intersection point on the input line,
   and the index of the intersected faces.
   If POS > 0, the point is also on the ray corresponding to the line. 
   
   Example
     [V, F] = createCube;
     line = [.2 .3 .4 1 0 0];
     pts = intersectLineMesh3d(line, V, F)
     pts =
         1.0000    0.3000    0.4000
              0    0.3000    0.4000

   See also
   meshes3d, triangulateFaces, intersectLineTriangle3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
INTERSECTLINEMESH3D Intersection points of a 3D line with a mesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
intersectPlaneMesh


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1564
INTERSECTPLANEMESH Compute the polygons resulting from plane-mesh intersection

   POLYS = intersectPlaneMesh(P, V, F)
   Computes the interection between a plane and a mesh given by vertex and
   face lists. The result is a cell array of polygons.

   The function currently returns at most one polygon in the cell array
   POLYS.


   Example
     % Intersect a cube by a plane
     [v f] = createCube; v = v * 10;
     plane = createPlane([5 5 5], [3 4 5]);
     % draw the primitives
     figure; hold on; set(gcf, 'renderer', 'opengl');
     axis([-10 20 -10 20 -10 20]); view(3);
     drawMesh(v, f); drawPlane3d(plane);
     % compute intersection polygon
     polys = intersectPlaneMesh(plane, v, f);
     drawPolygon3d(polys, 'LineWidth', 2);

     % Intersect a torus by a set of planes, and draw the results
     % first creates a torus slightly shifted and rotated
     torus = [.5 .6 .7   30 10   3 4];
     figure; drawTorus(torus, 'nTheta', 180, 'nPhi', 180);
     hold on; view (3); axis equal; light;
     % convert to mesh representation
     [v, f] = torusMesh(torus, 'nTheta', 64, 'nPhi', 64);
     % compute intersections with collection of planes
     xList = -50:5:50;
     polySet = cell(length(xList), 1);
     for i = 1:length(xList)
         x0 = xList(i);
         plane = createPlane([x0 .5 .5], [1 .2 .3]);
         polySet{i} = intersectPlaneMesh2(plane, v, f);
     end
     % draw the resulting 3D polygons
     drawPolygon3d(polySet, 'lineWidth', 2, 'color', 'k')


   See also
     meshes3d, intersectPlanes, intersectEdgePlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 78
INTERSECTPLANEMESH Compute the polygons resulting from plane-mesh intersection



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
mergeCoplanarFaces


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1033
MERGECOPLANARFACES Merge coplanar faces of a polyhedral mesh

   [NODES FACES] = mergeCoplanarFaces(NODES, FACES)
   [NODES EDGES FACES] = mergeCoplanarFaces(NODES, EDGES, FACES)
   NODES is a set of 3D points (as a nNodes-by-3 array), 
   and FACES is one of:
   - a nFaces-by-X array containing vertex indices of each face, with each
   face having the same number of vertices,
   - a nFaces-by-1 cell array, each cell containing indices of a face.
   The function groups faces which are coplanar and contiguous, resulting
   in a "lighter" mesh. This can be useful for visualizing binary 3D
   images for example.

   FACES = mergeCoplanarFaces(..., PRECISION)
   Adjust the threshold for deciding if two faces are coplanar or
   parallel. Default value is 1e-5.

   Example
   [v e iFace] = createCube;
   figure; drawMesh(v, iFace); view(3); axis equal;
   [v2 f2] = mergeCoplanarFaces(v, iFace);
   figure; drawMesh(v, f2); 
   view(3); axis equal; view(3);

   See also
   meshes3d, drawMesh, minConvexHull, triangulateFaces




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
MERGECOPLANARFACES Merge coplanar faces of a polyhedral mesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
meshAdjacencyMatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 460
MESHADJACENCYMATRIX Compute adjacency matrix of a mesh from set of faces

   ADJMAT = meshAdjacencyMatrix(FACES)
   Returns a sparse                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               