Question: How to write the equation of the plane passing through three points satisfies the given conditions?

I want to write the equation of the plane passing through the three points A, B, C has the form ax + by + cz + d = 0 where a, b, c, d are integer numbers, a >0 if a <> 0; b>0 if a = 0 and b<>0,...and igcd(a, b, c) = 1.

If the coordinates of the vertices A, B, C are all integers, for example A(2,2,2), B(1,2, -1), C(1,-1,-4), I tried,

with(geom3d):

point(A,2,2,2):

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

point(C,1,-1,-4):

plane(P,[A,B,C],[x,y,z]):

n:=NormalVector(P);

k:=igcd(n[1],n[2],n[3]):

if n[1]<>0 then

sign(n[1])*1/k*sort(Equation(P))

elif n[2] <> 0 then sign(n[2])*1/k*sort(Equation(P))

else sign(n[3])*1/k*sort(Equation(P))

end;

If the coordinates of the vertices A, B, C are rational numbers, for exmaple, point(A,-2,-1/7, 5/3), point(B,1/8, -2, -1), point(C,1,-1,4). How do I tell Maple to do that?

Please Wait...