refactoring alpha-shape algo