Reproducing the morphology-dependent resonances of spheres with the discrete dipole approximation.