Let M(1; -1; 0) be a point, Delta: (x-2)/2 =(y+1)/(-1) = (z - 1)/1 be a line, (P): x + y + z - 2 = 0 be a plane. Find the coordinates of the point A lies on (P), knowing that the line AM perpendicular to the line Delta and distance from the point A to the line Delta equal to sqrt(33/2).
This is my code
with(geom3d):
point(M,1,-1,3):
line(Delta,[2*t+2,-t-1,t+1],t):
plane(P,x+y+z+3=0,[x,y,z]):
a:=ParallelVector(Delta):
n:=NormalVector(P):
plane(Q,[M,a],[x,y,z]):
intersection(d,P,Q):
eq:=Equation(d,t):
coordinates(point(A,seq(eq[i],i=1..nops(eq)))):
sol:=solve(distance(A,Delta)=sqrt(33/2),{t}): coordinates(point(A1,eval(coordinates(A),op(sol[1]))));
coordinates(point(A2,eval(coordinates(A),op(sol[2]))));
Please comment to me. Thank you very much.