A direct computation of gravity and magnetic anomalies caused by 2- and 3-dimensional bodies of arbitrary shape and arbitrary magnetic polarization by equivalent-point method and a simplified cubic spline