added a fast way to get barycentric coordinates