polliwog/tri/surface_normals.py
def surface_normal(points, normalize=True):
    """
    Compute the surface normal of a triangle.

    Can provide three points or an array of points.
    """
    p1 = points[..., 0, :]
    p2 = points[..., 1, :]
    p3 = points[..., 2, :]
    normal = np.cross(p2 - p1, p3 - p1)
    return vg.normalize(normal) if normalize else normal

    Compute the surface normal of a triangle.

    Can provide three points or an array of points.
    
Compute the surface normal of a triangle.
Can provide three points or an array of points.
Compute the surface normal of a triangle . Can provide three points or an array of points .
def surface_normal(points, normalize=True):
    p1 = points[..., 0, :]
    p2 = points[..., 1, :]
    p3 = points[..., 2, :]
    normal = np.cross(p2 - p1, p3 - p1)
    return vg.normalize(normal) if normalize else normal
def surface_normal ( points , normalize = True ) : p1 = points [ ... , 0 , : ] p2 = points [ ... , 1 , : ] p3 = points [ ... , 2 , : ] normal = np . cross ( p2 - p1 , p3 - p1 ) return vg . normalize ( normal ) if normalize else normal
Compute the surface normal of a triangle.
Compute the surface normal of a triangle .
"""
    Compute the surface normal of a triangle.

    Can provide three points or an array of points.
    """
points
normalize