Question: Equation of a sphere (6)

Write the equation of the sphere passing through the point B(-1,-1,0) and tangent to the line x = t + 1, y = 2*t + 1, z = -t + 2 at the point A(1, 3, 2) so that its radius obtain minimum value.

This is my code.

> restart:with(geom3d):

point(B,-1,-1,0):

point(A,1,3,2):

a:=[t+1,2*t+3,-t+2]:

line(Delta,a,t):

dsegment(AB,[A,B]):

midpoint(M,A,B):

plane(P,[M,AB]):

Equation(P,[x,y,z]):

v:=ParallelVector(Delta):

plane(Q,[A,v]):

Equation(Q,[x,y,z]):

intersection(l,P,Q):

eq:=Equation(l,t):

coordinates(point(C,op(eq))):

R:=distance(A,C):

T:=minimize(R,'location'):

point(C1, subs(op(1,T[2][1]),coordinates(C))):

r:=distance(A,C1):

Equation(sphere(S,[C1,r],[x,y,z]));

Student[Precalculus][CompleteSquare](Equation(S));


Please comment to me, specialy the line point(C1, subs(op(1,T[2][1]),coordinates(C))):

Thank you very much.

 

 

 

Please Wait...