Two methods are described in this paper: the first one, which is based on the strict constraints of the structure function of atmospheric turbulence, is used to generate random wavefronts; the other method is used to measure the atmosphere correlation length from the long-exposure degraded image. Simulation results verify the effectiveness of the two methods.