How can I get a point on a sphere knowing the radius and the rotation?

113 Views Asked by At

I have the two rotation angles, the center and the radius of a sphere. Is there a way to get the point on the sphere intersected by my radius?

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

if $r$ is the radius, $\theta$ is the angle from the z axis, and $\phi$ is the angle around the z axis, away from the x axis (going counterclockwise if seen from the region of space $z>0$), then $x$, $y$, and $z$ are:
$$x = r*sin(\theta)*cos(\phi)$$ $$y = r*sin(\theta)*sin(\phi)$$ $$z = r*cos(\theta)$$