Draws the intersecting volume of two spheres in MATLAB?
<p>I have the equations of two spheres in MATLAB, like </p>

<pre><code>(x-x0)^2+(y-y0)^2+(z-z0)^2=R0^2
(x-x1)^2+(y-y1)^2+(z-z1)^2=R1^2
</code></pre>

<p>They have an intersecting part (I find a similar picture which could explain my meaning on the web like below)</p>

<p><a href="https://i.stack.imgur.com/uGyRB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uGyRB.jpg" alt="enter image description here"></a></p>

<p>Now I would like to only draw the spatial intersecting volume of these two spheres (like the 3D part between the curved faces with red lines in the sample image above)
Maybe I could use the command <code>'surface'</code> in MATLAB to draw out those two curved faces which make up the intersecting volume? I do not know how to do it....</p>

<p>Moreover, I also would like to draw these two spheres after erasing out those intersecting parts</p>

<p>That is, my goal: drawing out the intersecting and non-intersecting part of these two spheres individually.</p>

<p>Could anyone help me?</p>

<p>Thank you!</p>