fm_bary function

Compute barycentric coordinates