Wave-optics simulation of dynamic speckle: I. In a pupil plane.