How do you determine the portion of a cone that lies inside a cylinder?

318 Views Asked by At

How do you determine the portion of the cone $z = \sqrt{ (x-1)^2+y^2}$ that is inside the cylinder $r = 2$ ?

Here is my attempt:

Square both sides of the cone equation to get:

$z^2 = (x-1)^2 + y^2 = x^2-2x+1 + y^2 $

Observe the cylinder is $r = 2$ is the same as $x^2+y^2=4$.

Then $z^2 = x^2+y^2 -2x + 1 = 4 - 2x + 1 = 5 - 2x $

Therefore, $z^2 = 5-2x$

So $z = \sqrt{5-2x}$ is the equation of intersection of the cone and the cylinder of radius 2. But how do I know what the bounds are for the cone?

what are my bounds for $x$ and $y$ ?

The reason I need this is because I"m trying to graph only the portion of the cone that lies inside the cylinder in MATLAB, but if I can't figure out where to chop off the cone then I can't graph it properly.

1

There are 1 best solutions below

0
On BEST ANSWER

Set $x$ to take values between $-2$ and $2$

For every value of $x$ you can calculate the boundaries for $y$: $-\sqrt{4-x^2} \le y \le \sqrt{4-x^2}$

You can calculate $z$ using $z=\sqrt{5-2x}$