[Math] finding the radius of a circle that intersects a sphere

circlesgeometry

I'm an openGL programmer, trying to construct a sphere in specific circumstances.

Imagine a sphere sliced up into numerous flat horizontal circles.

Given a position along the vertical (Y) axis of the sphere and the radius of the sphere, how do I get the radius of the circle that is on the (X,Z) plane that intersects the Y axis at that point?

Best Answer

A sphere of radius $R$ is the solution set of $x^2 + y^2 + z^2 = R^2$ in which $x, y,$ and $z$ all vary. A slice of the sphere perpendicular to the $y$-axis has the same equation except that $y$ is a fixed number. So we have $x^2 + z^2 = R^2 - y^2$. With $y$ fixed, this is the equation of a circle with radius $\sqrt{R^2 - y^2}$.

Related Question