title: Computing the surface between two lines
body: <p>I have the following figure, where I plotted two surfaces and I wanted to indicate the intersection of both of them. To do that, I did the following:</p>
  
  <pre><code>zdiff = z1-z2;
  C = contours(x,y,zdiff,[0 0]);
  xL = C(1, 2:end);
  yL = C(2, 2:end);
  zL = interp2(x, y, z1, xL, yL);
  line(xL, yL, zL, 'Color', 'k', 'LineWidth', 2,'Linestyle','--'); hold on;
  line(xL, yL, zeros(size(zL)), 'Color', 'k', 'LineWidth', 2); hold off;
  </code></pre>
  
  <p>Now, I want to <strong>plot</strong> the vertical surface between the actual intersection (dash line) and its projection over XY (solid line), but I cannot figure out how to do that. Any ideas?</p>
  
  <p><a href="https://i.stack.imgur.com/bsSvx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsSvx.png" alt="Intersection of both surfaces"></a></p>