Length of a line to the surface of a sphere when line does not originate from center

39 Views Asked by At

Finding Length of a line to the surface of a sphere when line does not originate from center.

Here is what I know:

  • I have a 3D sphere of radius $7$
  • I have a line (call it line1) with a known polar and azimuthal angle leaving a point that is shifted from the center/origin $(x_0, y_0, z+0.4)$.
  • I am trying to determine the distance from the point of origin of line1 to the surface of the sphere.

I had a triangle built that with law of sines worked, but I am realizing the angle in this triangle ($\phi$) should be dependent on both azimuth and polar so am not sure how to get this angle any more. Initially I assumed this angle was just a function of polar (i. e. $90^\circ$-polar) but this only works if azimuthal in along the $z$-axis in the diagram. enter image description here