Abstract: | We present an efficient algorithm using a complex variables formulation for the computation of the gravity effect of 2D polygonal bodies having densities varying both laterally and with depth. The first derivatives of the gravity effect are also provided in order to enable the computation of the Jacobian matrix, which is necessary for linear inverse gravity problems. A geophysical example based on numerical assumptions about the density contrast on a well-studied basin area shows the applicability of the algorithm. |