triv_lib/geomat4d.c:44 int TrivPlaneFrom4Points(TrivPType Pt1, TrivPType Pt2, TrivPType Pt3, TrivPType Pt4, TrivPlaneType Plane)
with(linalg);
readlib(C);
d := det( matrix( [ [x - x1, y - y1, z - z1, w - w1],
[x2 - x1, y2 - y1, z2 - z1, w2 - w1],
[x3 - x2, y3 - y2, z3 - z2, w3 - w2],
[x4 - x3, y4 - y3, z4 - z3, w4 - w3]] ) );
coeff( d, x );
coeff( d, y );
coeff( d, z );
coeff( d, w );
Pt1, Pt2, Pt3, Pt4: The four points the plane should go through.
Plane: Where the result should be placed.