(tri)
return vector_cross(vec1, vec2)
Computes the (approximate) normal vector of the input triangle.

    :param tri: triangle object
    :type tri: elements.Triangle
    :return: normal vector of the triangle
    :rtype: tuple
Computes the (approximate) normal vector of the input triangle.
Computes the ( approximate ) normal vector of the input triangle .
def triangle_normal(tri):
    """ Computes the (approximate) normal vector of the input triangle.

    :param tri: triangle object
    :type tri: elements.Triangle
    :return: normal vector of the triangle
    :rtype: tuple
    """
    vec1 = vector_generate(tri.vertices[0].data, tri.vertices[1].data)
    vec2 = vector_generate(tri.vertices[1].data, tri.vertices[2].data)
    return vector_cross(vec1, vec2)
def triangle_normal ( tri ) : vec1 = vector_generate ( tri . vertices [ 0 ] . data , tri . vertices [ 1 ] . data ) vec2 = vector_generate ( tri . vertices [ 1 ] . data , tri . vertices [ 2 ] . data ) return vector_cross ( vec1 , vec2 )