Centerpoint calculated, added helper functions

Program now prints out calculated center of the patterns, where the
sphere would be.