Given a 2D point x[2], determine the barycentric coordinates of the point.
Barycentric coordinates are a natural coordinate system for simplices that
express a position as a linear combination of the vertices. For a
triangle, there are three barycentric coordinates (because there are
fourthree vertices), and the sum of the coordinates must equal 1. If a
point x is inside a simplex, then all three coordinates will be strictly
positive. If two coordinates are zero (so the third =1), then the
point x is on a vertex. If one coordinates are zero, the point x is on an
edge. In this method, you must specify the vertex coordinates x1->x3.
Returns 0 if triangle is degenerate.