• Parameters

    • graph: FOLD

      a FOLD object

    Returns [number, number, number][]

    an array of 3D vectors, one for every face

    Description

    Make one vector for every face that represents the face's normal direction. This assumes that the faces are planar and convex. It works by taking the first 3 adjacent non-parallel vertices and compute the cross product from 0 to 1 and 0 to 2. The windings may be flipped if faces are non-convex, otherwise they will still be correct.