Question: Coordinates of a point (8)

Problem. Let MNPQ be a square.  Find the other two vertices,  knowing that,  the vertices M(5; 3; -1), P(2; 3; -4) and N lies on the plane x + y - z  - 6 = 0.

This is my code

> restart:

with(LinearAlgebra):

M:=<5,3,-1>:

P:=<2,3,-4>:

N:=<x,y,z>:

A:=DotProduct(M-N,P-N,conjugate =false):

B:=Norm(M-N,2)=Norm(P-N,2):

sol:=solve([x+y-z-6=0,A=0,B],[x,y,z]):T:=(M+P)/2:for i to nops(sol) do N[i]:=<rhs(sol[i][1]), rhs(sol[i][2]),rhs(sol[i][3])> end do;

for i to 2 do Q[i] = 2*T-N[i] end do;

Please comment to me. Thank you.

 

Please Wait...