fixed the issue with point order

In cases that center point was out of the surface the order of the
points were reversed. This is fixed.