TORUSMESH  Create a 3D mesh representing a torus.

   [V, F] = torusMesh(TORUS)
   Converts the torus in TORUS into a face-vertex quadrangular mesh.
   TORUS is given by [XC YC ZY R1 R2 THETA PHI]
   where (XC YZ ZC) is the center of the torus, R1 is the main radius, R2
   is the radius of the torus section, and (THETA PHI) is the angle of the
   torus normal vector (both in degrees).

   [V, F] = torusMesh(TORUS, 'nTheta', NT, 'nPhi', NP)
   Creates a mesh using NP circles, each circle being discretized with NT
   vertices. Default are 60 for both parameters.

   [V, F] = torusMesh()
   Creates a mesh representing a default torus.

   Example
     [v, f] = torusMesh([50 50 50 30 10 30 45]);
     figure; drawMesh(v, f, 'linestyle', 'none');
     view(3); axis equal; 
     lighting gouraud; light;


   See also
     meshes3d, drawTorus, revolutionSurface, cylinderMesh, sphereMesh
     drawMesh

Package: matgeom