Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1010
  • Last Modified:

Tangent line to a sphere

I have a arbitrary point on a sphere.  The sphere has an arbitrary radius.

I want to find a tanget line to the point on the sphere, or perhaps more correctly put, I want to find the tangent plane and from the tanget plane obtain any arbitrary line within the plane that touches the point on the sphere.
2 Solutions
If the point on the sphere is x1,y1,z1, and the center of the sphere is x0.y0.z0
the tangent plane is (x-x1)(x1-x0)+(y-y1)(y1-y0)+(z-z1)(z1-z0)=0
ozo (as usual!) has been quick, good, and to the point (pun intended), but perhaps you would like to know a bit more about the solution.

A generic vector with origin in (x1,y1,z1) has the following components:

A vector corresponding to the radius of the sphere ending on (x1,y1,z1) has components:

Two vectors are perpendicular when their scalar product is zero.  If you apply this to the two vectors just defined you get ozo's formula:

You only need to remove the parentheses to get the equation of a plane in the usual form:
  a*x + b*y + c*z + d = 0
This plane passes through (x1,y1,z1) and, being perpendicular to the radius ending in the same point, is tangent to the sphere.
bbangerterAuthor Commented:
Thanks ozo and thanks PointyEars for giving me that connection between ozos formula and the standard plane equation.

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now