We propose an algorithm for direct computer simulation of random samples of the image of an incoherently illuminated object that is viewed through the atmospheric layer. The algorithm has been constructed based on the method developed in Ref. [1]. This algorithm can be used in the development and tests of image processing methods, simulation of adaptive systems of image correction, and in other problems