Refactor for common ellipsoid geometry