[Math] Tangent to a sphere

3dgeometryplane-geometryspheresvectors

We are given center and radius of a sphere as c(c1,c2,c3) and r respectively and a external point k(k1,k2,k3),we have an other point p(p1,p2,p3)(given in some linear parametric form) such that kp is tangent to sphere.
We have to find the variables of parametric forms of p.

My approach:
Take a point x(x1,x2,x3) which will be both on tangent and sphere.Now using xp and xk find nomal vector and compare it with vector cx but this approach is getting very complex to solve and did not produce a result.

Can anyone provide any better approach?

Best Answer

( Assuming the sphere is centered at the origin.)

Since $KP$ is tangent to the sphere, it should be perpendicular to $CP$, where $CP$ is the radius of the sphere. The direction vector of $KP$ is:

$\vec{d_1}=<p1 - k1, p2 - k2, p3 - k3>$

The direction vector of $CP$ is:

$\vec{d_2}=<p1, p2, p3>$

$\vec{d_1} . \vec{d_2}=0$

$\therefore p_1^2 + p_2^2 + p_3^3 - k_1 p_1 - k_2 p_2 - k_3 p_3 = 0$

We know that $P$ is on the sphere. So: $p_1^2 + p_2^2 + p_3^2 = r^2$

So the final equation is:

$r^2 - k_1 p_1 - k_2 p_2 - k_3 p_3 = 0$

This gives us a plane. The intersection of this plane with the sphere is the answer to the question, which is obviously a circle. One way to express this circle, is to find its center, and then write the equation of the other points relative to that point. The center of this circle is going to be the intersection point of the mentioned plane with the line connecting the origin to $K$. With a few simple steps, it is found that this point is at: $(\dfrac{k_1 r^2}{k_1^2+k_2^2+k_3^2},\dfrac{k_2 r^2}{k_1^2+k_2^2+k_3^2},\dfrac{k_3 r^2}{k_1^2+k_2^2+k_3^2})$

Now, we have to find the radius of this circle:

Diagram 1

This picture is the side view of our sphere. We're trying to find $d$. $d$ is equal to $\sin(\theta) \times "length\ of\ the\ tangent"$.

The length of the tangent can be found using the Pythagorean theorem. Therefore, we get:

$d = \dfrac{r \times \sqrt{k_1^2+k_2^2+k_3^2-r^2}}{\sqrt{k_1^2+k_2^2+k_3^2}}$

Now, we have the center and the radius of a circle, and we want to express its parametric equation. If we define our $x$ and $y$ axis in a way that they're both on the mentioned plane, the problem is solved. We just need to find two unit vectors which are both perpendicular to the plane, and are perpendicular to each other. The plane equation was: $r^2 - k_1 p_1 - k_2 p_2 - k_3 p_3 = 0$

It can be easily shown that the following vectors have the mentioned characteristics: (Any two vectors that satisfy these conditions are valid)

$\hat{I}=\dfrac{k_2 \hat{x} - k1 \hat{y}}{\sqrt{k_1^2+k_2^2}}$

$\hat{J}=\dfrac{k_1k_3 \hat{x} + k_2k_3 \hat{y} - (k_1^2+k_2^2) \hat{z}}{\sqrt{k_1^2 k_3^2 + k_2^2 k_3^2 + (k_1^2 + k_2^2)^2}}$

So in conclusion, we gain:

$(\dfrac{k_1 r^2}{k_1^2+k_2^2+k_3^2},\dfrac{k_2 r^2}{k_1^2+k_2^2+k_3^2},\dfrac{k_3 r^2}{k_1^2+k_2^2+k_3^2})^{*1} + (\dfrac{r \times \sqrt{k_1^2+k_2^2+k_3^2-r^2}}{\sqrt{k_1^2+k_2^2+k_3^2}})^{*2} \times (\cos(\theta) \hat{I} + \sin(\theta) \hat{J})$

*1 -> This is the center of the circle

*2 -> This is the radius of the circle, or $d$

Related Question