Methods for Computing the Potential of an Irregular, Homogeneous, Solid Body and its Gradient