Refactoring boundary computation: Separating it into its own function.
First steps on implementing parameterization by projecting into a circle.