import os import random numpage=10 for i in range(numpage): print "\\section{}" print "{\\Huge\\textbf{dT(Y)Tb}}" print "\\newline" print "{\\Huge\\textbf{Feed The Bears!}}" print "\\begin{picture}(0,0)" for c in range(random.randint(1, 50)): randomop=str(random.randint(1,10)/10.0) os.system('convert -size 100x60 xc:transparent -fill black -stroke black -draw "polygon 0,'+str(random.randint(0, 60))+' '+str(random.randint(0, 100))+',0 60,'+str(random.randint(0, 60))+' 100,'+str(random.randint(0, 60))+'" -flatten draw_polygon'+str(c)+'.gif') os.system('autotrace -corner-threshold 1000 draw_polygon'+str(c)+'.gif -output-file draw_polygon'+str(c)+'.pdf') if (c%2==0): print "\\put("+str(random.randint(0, 30)/-10.0)+","+str(random.randint(0, 50)/-10.0)+"){" print "\\includegraphics[scale=1, angle="+str(random.randint(0,360))+"]{i/a/workshop/bag/participants/emanuele/draw_polygon"+str(c)+".pdf}" print "}" print "\\put("+str(random.randint(0, 30)/-10.0)+","+str(random.randint(0, 50)/-10.0)+"){" print "\\includegraphics[scale="+str(random.randint(1, 50)/100.0)+", angle="+str(random.randint(0,360))+"]{i/a/utils/graphics/blank/black.pdf}" print "}" else: print "\\put("+str(random.randint(0, 30)/10.0)+","+str(random.randint(0, 50)/-10.0)+"){" print "\\includegraphics[scale=1, angle="+str(random.randint(0,360))+"]{i/a/workshop/bag/participants/emanuele/draw_polygon"+str(c)+".pdf}" print "}" print "\\put("+str(random.randint(0, 30)/10.0)+","+str(random.randint(0, 50)/-10.0)+"){" print "\\includegraphics[scale="+str(random.randint(1, 50)/100.0)+", angle="+str(random.randint(0,360))+"]{i/a/utils/graphics/blank/black.pdf}" print "}" print "\\end{picture}" print "\\newpage"