adding new dirty 3D centroid

Adding a dirty workaround for a 3D centroid function