DRAWDOME Draw a dome (half-sphere, semi-sphere) as a mesh.

   drawDome(DOME)
   Where DOME = [XC YC ZC R], draw the dome centered on the point with
   coordinates [XC YC ZC] and with radius R, using a quad mesh.
 
   drawDome(Dome, V)
   Where DOME = [XC YC ZC R] and V is a vector in the direction of the top
 
   drawDome(CENTER, R, V)
   Where CENTER = [XC YC ZC], specifies the center and the radius with two
   arguments and vector as third argument.
 
   drawdrawDome(XC, YC, ZC, R, V)
   Specifiy dome center, radius and vector as five arguments.

   drawDome(..., NAME, VALUE);
   Specifies one or several options using parameter name-value pairs.
   Available options are usual drawing options, as well as:
   'nPhi'    the number of arcs used for drawing the meridians
   'nTheta'  the number of circles used for drawing the parallels

   H = drawDome(...)
   Return a handle to the graphical object created by the function.

   [X Y Z] = drawdrawDome(...)
   Return the coordinates of the vertices used by the dome. In this
   case, the dome is not drawn.

   Example
   % Draw four domes with different centers
     figure(1); clf; hold on;
     drawDome([0 0 1 1], 'FaceColor', 'b', 'EdgeColor', 'k', 'LineStyle', ':');
     drawDome([0 1 0 1], [0 1 0]);
     drawDome([0 -1 0 0.5], [1 0 0]);
     drawDome([0 -5 4 10], 'FaceAlpha', 0.5, 'EdgeColor', 'r', 'LineStyle', '-');
     view([-30 20]); axis equal; l = light;

   % Draw dome with different settings
     figure(1); clf;
     drawDome([10 20 30 10], [0 0 1], 'linestyle', ':', 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;

   % The same, but changes style using graphic handle
     figure(1); clf;
     h = drawDome([10 20 30 10], [1 0 0]);
     set(h, 'linestyle', ':');
     set(h, 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;
   
   % Draw a dome with high resolution
     figure(1); clf;
     h = drawDome([10 20 30 10], 'nPhi', 360, 'nTheta', 180);
     l = light; view(3);


   See also
   drawSphere

Package: matgeom