This is a silly question but I'm stuck.. I'm given the sphere $(C):(x-1)^2+(y-2)^2+(z-3)^2=1$ with radius $r=1$ and center $K(1,2,3)$ and the plane $(P):x+y+z=6+\sqrt3$
I proved that they are tangent, I need to find their contact point
Any hints?
This is a silly question but I'm stuck.. I'm given the sphere $(C):(x-1)^2+(y-2)^2+(z-3)^2=1$ with radius $r=1$ and center $K(1,2,3)$ and the plane $(P):x+y+z=6+\sqrt3$
I proved that they are tangent, I need to find their contact point
Any hints?
On
The contact point will be the closest point on the plane from the center of the sphere. So if the point is $(x,y,z)$ then we have to minimize the distance $(x-1)^2+(y-2)^2+(z-3)^2$ subject to the condition that the point belongs to the plane. Using Lagrange multiplier it is done quickly.
On
This can be done with some vector maths:
Firstly, we can see that the intersection is always perpendicular to the surface of the plane, the distance along the plane is yet to be determined. It can be calculated by taking the minimum distance of a point from a plane (which is just dot(point - point_on_plane, normalize(plane_normal)), but since we know that the radius is 1 we can assumed that N is unit length, so unit length of (1,1,1) is (sqrt(1/3), sqrt(1/3),sqrt(1/3).
Depending on which way the plane normal is facing (towards or away from the sphere center, which can be determined with a dot product), the equation will be P = K - N.
Since in this case, we choose a vector (1,1,1), which when the dot product is taken, dot(vec3(1,1,1), vec3(1,2,3)) it is positive so the vectors are facing the same way so we want to use the equation:
P = K + N.
So the collision point is P = (1,2,3) + (sqrt(1/3), sqrt(1/3),sqrt(1/3)).
On
The distance between the center of the sphere, which is $(1,2,3)$ and the plane is
$ d = \dfrac{ 1 + 2 + 3 - (6 + \sqrt{3}) } { \sqrt{1^2 + 1^2 + 1^2} } = 1 $
Therefore, indeed, the plane is tangent to the sphere. The unit normal to the plane is the vector
$ V = [1, 1, 1]/\sqrt{3} $
A point on the given plane $x + y + z - (6 + \sqrt{3} ) = 0 $ is
$P_0 =(1 + \sqrt{3} , 2, 3 ) $
The center of the sphere is $ C = (1, 2, 3) $
Now $(C - P_0) \cdot V = -1 \lt 0 $, therefore, the center of the sphere is side opposite to the side pointed to by the unit normal $V$. It follows directly that the tangency point is
$Q = C + (1) V = (1, 2, 3) + (1, 1, 1)/\sqrt{3} $
To verify that $Q$ is indeed on the sphere and on the plane, substitute the coordinates of $Q$ in the equation of the sphere, you find that it does satisfy the equation of the sphere, becaue
$ (Q - C)^T (Q - C) = \dfrac{1}{3} [1, 1, 1] [1, 1, 1]^T = 1 $
And for the plane
$[1, 1, 1]^T (Q) = 6 + \sqrt{3}$
Recall that the radius of the sphere is perpendicular to the plane at their common point. So you need only find the projection of K on the given plane. To do that, find the vector that is perpendicular to P and then find a straight line parallel to it that passes from K. If you need more help, edit your progress first.