Find the equation of plane which passes through two points and parallel to a given axis | javascript implementation to find the equation of plane which passes through two points and parallel to a given axis ; Find direction vector of points ( x1 , y1 , z1 ) and ( x2 , y2 , z2 ) ; Values that are calculated and simplified from the cross product ; Prvar the equation of plane ; Povar A ; Povar B ; Given axis ; Function Call
function findEquation ( x1 , y1 , z1 , x2 , y2 , z2 , d , e , f ) { var a = x2 - x1 ; var b = y2 - y1 ; var c = z2 - z1 ; var A = parseInt ( ( b * f - c * e ) ) ; var B = parseInt ( ( a * f - c * d ) ) ; var C = parseInt ( ( a * e - b * d ) ) ; var D = - parseInt ( ( A * d - B * e + C * f ) ) ; document . write ( A + " " + B + " " + C + " " + D + " " ) ; } var x1 = 2 , y1 = 3 , z1 = 5 ; var x2 = 6 , y2 = 7 , z2 = 8 ; var a = 11 , b = 23 , c = 10 ; findEquation ( x1 , y1 , z1 , x2 , y2 , z2 , a , b , c ) ;