Find the equation of plane which passes through two points and parallel to a given axis | Python3 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 ; Print the equation of plane ; Driver Code ; Point A ; Point B ; Given axis ; Function Call
def findEquation ( x1 , y1 , z1 , x2 , y2 , z2 , d , e , f ) : NEW_LINE INDENT a = x2 - x1 NEW_LINE b = y2 - y1 NEW_LINE c = z2 - z1 NEW_LINE A = ( b * f - c * e ) NEW_LINE B = ( a * f - c * d ) NEW_LINE C = ( a * e - b * d ) NEW_LINE D = - ( A * d - B * e + C * f ) NEW_LINE print ( A , " x ▁ + ▁ " , B , " y ▁ + ▁ " , C , " z ▁ + ▁ " , D , " = ▁ 0" ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT x1 = 2 NEW_LINE y1 = 3 NEW_LINE z1 = 5 ; NEW_LINE x2 = 6 NEW_LINE y2 = 7 NEW_LINE z2 = 8 NEW_LINE a = 11 NEW_LINE b = 23 NEW_LINE c = 10 NEW_LINE findEquation ( x1 , y1 , z1 , x2 , y2 , z2 , a , b , c ) NEW_LINE DEDENT