Wavefront amplitude distortion and image sidelobe levels. I. Theory and computer simulations