minhthien2016

280 Reputation

6 Badges

5 years, 262 days

MaplePrimes Activity


These are answers submitted by minhthien2016

Note that, you can assum A^2 + B^2 + C^2 = 1. I copy this code from Kitonum's answer.
 

restart:
local D:
np:=<A,B,C>: nq:=<1,-1,0>: P:=A*x+B*y+C*z+D=0: M:=[1,0,0]: N:=[0,0,-1]:
Sys1:=eval(P,[x,y,z]=~M);
Sys2:=eval(P,[x,y,z]=~N);
Sys3:=(np.nq)/sqrt(np.np)/sqrt(nq.nq)=cos(Pi/4) assuming real;
Sol:=[solve({Sys1,Sys2,Sys3,A^2 + B^2 + C^2 =1})];
eval(P,Sol[1]); # The first solution
simplify(eval(P,Sol[2])); # The second solution

You can use

 

with(Student:-MultivariateCalculus):
 A := [0, -3]:
 B := [3, 1]:
 P := [5, -2]:
 d := Line(A, B):
H := Projection(P, d);

 

Page 1 of 1