On the numerical computation of scattering from inhomogeneous penetrable objects