title: How can I shade the area bounded between two 3d curves? How to draw a curtain between them?
body: <p>For my tutorial to exemplify the line integral for <em>z=x+iy</em> over the unit circle. Therefore, I want to plot the height areas for each part, like curtain between them. So first my main curve is <em>z(x,y)=x</em>:</p>
  
  <pre><code>th = linspace(0,2*pi,40);
  r = linspace(4,4.5,40);
  [TH,R] = meshgrid(th,r);
  [X,Y] = pol2cart(TH,R);
  Z = X;
  </code></pre>
  
  <p>and then I added the xy-plane (<em>z=0</em>):</p>
  
  <pre><code>mesh(X,Y,Z);
  hold on;
  % Z threshold value. 
  threshold = .0001; % please change this as needed
  % Obtain the limits of the axes
  yp = get(gca,'Ylim');
  xp = get(gca,'Xlim');
  % Use the axes x and Y limits to find the co-ordinates for the patch
  x1 = [ xp(1) xp(2) xp(2) xp(1)];
  y1 = [ yp(1) yp(1) yp(2) yp(2)];
  z1 = ones(1,numel(x1))* threshold;  % creates a 1x4 vector representing the Z coordinate values 
  p = patch(x1,y1,z1, 'b');
  % Set the Face and edge transparency to 0.2 using the following properties
  set(p,'facealpha',0.2)
  set(p,'edgealpha',0.2)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/HaRZo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HaRZo.png" alt="circle and plane"></a></p>
  
  <p>Now I want to fill the area bounded by the xy-plane and the curve <em>z(x,y)=x</em> like a curtain between them. Here is an example of what I mean to get the idea:<br>
  <a href="https://i.stack.imgur.com/Re7xF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Re7xF.png" alt="example"></a></p>
  
  <p>Can this be done with <a href="http://www.mathworks.com/help/matlab/ref/fill3.html" rel="nofollow noreferrer"><code>fill3</code></a> or <a href="http://www.mathworks.com/help/matlab/ref/waterfall.html" rel="nofollow noreferrer"><code>waterfall</code></a>?
  Even better would be to have the upper and lower curtains to be different colors, to exemplify that they cancel out.</p>
  
  <p>I can also try C++ or Mathematica if you want.</p>