generates ppm images for each iteration