added barycentric coordinates for texture mapping triangles