Polygon barycenter computation now works utterly. It turns out the formula was wrong.