One- and two-dimensional scattering analysis using a fast numerical method