# Equation for surface of intersection between cone and sphere

Given a sphere of radius $$r$$ centered at the origin $$(0,0,0)$$ and a cone with an apex $$> r$$ from center of the sphere, with a cone angle of $$\theta$$, pointing at the center, how do I define the surface of the portion of the sphere that is inside the cone?

I know the equation for calculating the equation of the circle representing the edge of the intersection, but how do you define the area inside a circle in 3d space?

If I understood correctly, you are interested in the surface:

$$\Sigma := \left\{ (x,\,y,\,z) \in \mathbb{R}^3 : x^2 + y^2 + z^2 = r_1^2, \; x^2 + y^2 \le r_2^2\left(1 - \frac{z}{h}\right)^2, \; 0 \le z \le h \right\}$$

that's to the portion of spherical surface $$x^2 + y^2 + z^2 = r_1^2$$ (center of the origin and radius $$r_1 > 0$$) placed inside the right conical surface $$x^2 + y^2 = r_2^2\left(1 - \frac{z}{h}\right)^2$$ of height $$h > r_1$$ and base radius $$0 < r_2 < r_1$$ oriented along the z-axis, with vertex pointing up and with the base located at $$z=0$$ (where $$\theta = 2\arctan(r_2/h)$$ is the opening angle).

In this case, the surface in question can be parameterized naturally:

$$(x,\,y,\,z) := \left(r_1\,\sin u\,\cos v, \; r_1\,\sin u\,\sin v, \; r_1\,\cos u\right) \; \; \; \text{with} \; (u,\,v) \in [u_1,\,u_2] \times [0,\,2\pi]$$

where the ends of the interval for $$u$$ can be determined by solving the inequality system:

$$r_1^2\,\sin^2 u \le r_2^2\left(1-\frac{r_1\,\cos u}{h}\right)^2, \; \; \; 0 \le r_1\,\cos u \le h\,, \; \; \; 0 \le u \le \pi$$

who offers:

$$0 \le u \le 2\arctan\left(\frac{h\,r_1 - \sqrt{h^2\left(r_1^2 - r_2^2\right) + (r_1\,r_2)^2}}{(h + r_1)\,r_2}\right).$$