######################################################################### # Returns the normal equation of the plane through 3 points a,b,c in 3D. # Usage: P3points(<1,0,0>, <1,1,0>, <0,1,1>); # returns -x - z + 1 = 0. ######################################################################### P3points := proc (a, b, c) local ex1, ex2, n, r; global x, y, z; r := ; n := LinearAlgebra:-CrossProduct(b-a,c-a); ex1 := `assuming`(LinearAlgebra:-DotProduct(n,r-a),real); ex2 := collect(ex1,[x, y, z]); ex2 := sort(ex2,[x, y, z]); RETURN(ex2 = 0) end proc;