1
$\begingroup$

Given a reference frame $x,y,z$, and a sphere of radius $R$ with center in the origin of the frame, I take a spherical cap with height $h$ having the center on the $x$ axis. I am looking for a formula giving the intersection angle between a line starting from $x_0,y_0,z_0$ of direction cosines $\alpha,\beta,\gamma$ and the cap vs. $y$ and $z$ or in alternative, in spherical coordinates vs. $\theta$ and $\phi$. Can anybody help me? Thanks.

$\endgroup$
  • $\begingroup$ Have you got the target angle in Cartesian coordinates before, then? $\endgroup$ – mrs Jul 10 '13 at 18:00
  • $\begingroup$ @BabakS.I have only the direction cosines of the line, but I don't know the target angle of the line respect to the plane tangent to the spherical cap in the intersection point. $\endgroup$ – Riccardo.Alestra Jul 11 '13 at 8:21
  • $\begingroup$ I see what you are looking for. My question here is that you wanna that in spherical coordinate and this may make the result a bit harder, I think. Right? $\endgroup$ – mrs Jul 11 '13 at 8:23
  • $\begingroup$ @BabakS:In cartesian coordinates is OK if this is simpler than in spherical ones $\endgroup$ – Riccardo.Alestra Jul 11 '13 at 8:40
0
$\begingroup$

I find that it’s often easier overall to first overgenerate potential solutions by solving a simpler problem, then cull those that don’t meet additional criteria. This looks like one of those cases.

Start by computing the intersections of the line with the entire sphere, if any. You have $\mathbf p_0 = (x_0,y_0,z_0)$ and $\mathbf v=(\alpha,\beta,\gamma)$, so this is simply a matter of solving the quadratic equation $\|\mathbf p_0+t\mathbf v\|^2=R$ for $t$. Discard any solutions for which $x\notin[R-h,R]$. If you also need the intersection with the “bottom” of the cap, solve $x_0+t\alpha=R-h$ for $t$ and check that the distance of the resulting point from the origin is $\le R$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.