"Florin Neacsu" wrote in message <ipumdp$7kc$1@newscl01ah.mathworks.com>...
> "Andy Righter" wrote in message <ipuj4p$run$1@newscl01ah.mathworks.com>...
> > I've got a simple graphing problem that, at my limited skill level, I'm unsure of how to approach. Can anyone show me how to plot the surface formed by the intersection of the cone z^2 = x^2 + y^2 and the sphere x^2 + y^2 + z^2 = 8? Thanks.
>
> Hi,
>
> Have a look at meshgrid. Then create z1^2=x^2+y^2 as z1=sqrt( .... ). Then have a look at surf. Do the same for your other surface. Use hold on to plot them together.
>
> If you want to plot just the intersection then you need to define that intersection. First, does it exist (plotting them first might tell you that :) ) ? Once you determined the intersection, use the appropiate function to plot it.
>
> Good luck.
> Regards,
> Florin
> P.S. If this is the first time you are using meshgrid and surf, take your time and read the documentation and the examples.
Hi,
I just realized you want to plot a sphere. Maybe have a look at isosurface also.
Florin
