Create a 3D mesh representing a sphere.

   [V, F] = sphereMesh(S)
   Creates a 3D mesh representing the sphere S given by [xc yc zy r].

   [V, F] = sphereMesh();
   Assumes sphere is the unit sphere centered at the origin.

   [V, F] = sphereMesh(S, 'nTheta', NT, 'nPhi', NP);
   Specifies the number of discretisation steps for the meridians and the
   parallels. Default values are nTheta = 16 and nPhi = 32.


   Example
     s = [10 20 30 40];
     [v, f] = sphereMesh(s);
     drawMesh(v, f);
     view(3); axis equal; light; lighting gouraud;

   See also
     meshes3d, drawSphere, ellipsoidMesh, cylinderMesh, surfToMesh

Package: matgeom