Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Sphere / Cone Intersection

Subject: Sphere / Cone Intersection

From: Lion Summerbell

Date: 5 May, 2011 16:27:05

Message: 1 of 3

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.

Subject: Sphere / Cone Intersection

From: Florin Neacsu

Date: 5 May, 2011 17:23:05

Message: 2 of 3

"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.

Subject: Sphere / Cone Intersection

From: Florin Neacsu

Date: 5 May, 2011 17:58:04

Message: 3 of 3

"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

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us