I wrote a program in order to find coordinates orthocenter of the triangle. Please comment for me. This is my code:
restart;
with(geom3d);
point(A,1,-3,0);
point(B,-2,1,1);
point(C,3,1,2);
line(AB,[A,B],t);
line(BC,[B,C],t);
ab:=ParallelVector(AB);
bc:=ParallelVector(BC);
eq1:=Equation(plane(P,[C,ab],[x,y,z]));
eq2:=Equation(plane(Q,[A,bc],[x,y,z]));
eq3:=Equation(plane(ABC,[A,B,C],[x,y,z]));
hpt:=solve([eq1,eq2,eq3],[x,y,z]);
point(M,x,y,z);
subs(hpt[1],coordinates(M));