#uv_imgs = export_uv(scott) t1 = time() print "performing " + str(gen) + " generations ", for n in range(gen): print ".", scott.step() if gen % stepsize == 0: scott.record() print t2 = time() print " took: %f" % (t2 - t1) print "writing uv images ", imgs = scott.to_image_sequence(u0v1, u1v0, u0v0, 0.5) for i, img in enumerate(imgs): print ".", img.save(f_name + "_uv_%03d" % i, path) print print "writing u images ", imgs = scott.to_image_sequence(v_color=Color(0.0), u_color=Color(0.0), base_color=Color(1.0), power=False, uv_flag='u') for i, img in enumerate(imgs): print ".",
''' diffusion.set_rect(3, 10, 2, 8) diffusion.set_rect(width - 3, height - 10, 2, 8) diffusion.set_rect(width / 2, 2, 4, 4) from time import time for n in range(20): print "step", n t0 = time() for m in range(10): diffusion.step() diffusion.record() print 'step took: %f' % (time() - t0) n = 0 for img in diffusion.to_image_sequence(): img.save("img_" + str(n), path, True) n += 1 ''' vfield = ValueField(Interval(100,100)) for n in range(3): vfield.set(1,1,10.0) vfield.set(1,2,8.0) vfield.set(3,n,8.0) img = vfield.to_image(Color(1.0),Color(1.0,0,0)) img.save("img_"+str(n), path) ''' #raw_input("press enter...")
''' diffusion.set_rect(3,10,2,8) diffusion.set_rect(width-3,height-10,2,8) diffusion.set_rect(width/2,2,4,4) from time import time for n in range(20): print "step",n t0 = time() for m in range(10): diffusion.step() diffusion.record() print 'step took: %f' %(time()-t0) n = 0 for img in diffusion.to_image_sequence(): img.save("img_"+str(n), path, True) n+=1 ''' vfield = ValueField(Interval(100,100)) for n in range(3): vfield.set(1,1,10.0) vfield.set(1,2,8.0) vfield.set(3,n,8.0) img = vfield.to_image(Color(1.0),Color(1.0,0,0)) img.save("img_"+str(n), path) ''' #raw_input("press enter...")
#uv_imgs = export_uv(scott) t1 = time() print "performing "+str(gen)+" generations ", for n in range(gen): print ".", scott.step() if gen%stepsize == 0: scott.record() print t2 = time() print " took: %f" %(t2-t1) print "writing uv images ", imgs = scott.to_image_sequence(u0v1,u1v0,u0v0,0.5) for i,img in enumerate(imgs): print ".", img.save(f_name+"_uv_%03d"%i, path) print print "writing u images ", imgs = scott.to_image_sequence(v_color = Color(0.0), u_color = Color(0.0), base_color = Color(1.0), power = False, uv_flag = 'u') for i,img in enumerate(imgs): print ".", img.save(f_name+"_u_%03d"%i, path) print