The scattering and diffraction of waves