This function calculat(ed) the lengths of the diagonals of the quad p1 -> p3 and p2 -> p4, and resulted
with a fold on the shortest of the diagonals. That works in some cases.
The function now calculates the nearest points on the two crossing lines of the quad and picks the line furthest along the normal passed in; this might be called 'the choice enclosing the most area'. The other choice might be more appropriate on inward curvatures and minimizations.
var direction = getFold( faceNormal, p1, p2, p3, p4 );
if( direction )
GenerateTriangles( [ p1, p2, p3 ], [p1, p3, p4] ); // the common line is p1-p3
else
GenerateTriangles( [ p2, p3, p4 ], [p2, p4, p1] ); // the common line is p2-p4
