Question: Equation of a sphere (2)

Let A(1,-2,3), B(-1,0,1) be two points and (P): x+y+z+4=0 be a plane. Write the equation of the sphere has center lies on the line AB, radius of sphere equal to AB/6 and sphere tangent to the plane (P).

This is my code.

> restart:with(geom3d):

point(A,1,-2,3):

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

line(AB,[A,B],t):

eq:=Equation(AB):

point(M,op(eq)):

plane(P,x+y+z+4=0,[x,y,z]):

R:=distance(A,B)/6:

d:=distance(M,P):

sol:=solve(R=d,{t});

coordinates(point(T1,eval(coordinates(M),sol[1]))): #first way

Equation(sphere(S1,[T1,R],[x,y,z]));

(S[1]):=Student[Precalculus][CompleteSquare](Equation(S1));

coordinates(point(T2,subs(sol[2],coordinates(M)))): #second way

Equation(sphere(S2,[T2,R],[x,y,z])); S[2]:=Student[Precalculus][CompleteSquare](Equation(S2));

 

How can i use the command for in order to write the equation of the plane S1 and S2 the same time? 

Please help me. Thank you.

Please help me

Please Wait...