get_center function

Calculate the center of a curve