BUG: there was an error in calculating the centroid of the points (for inplane translation).