A method for modeling the resistivity and IP response of two-dimensional bodies