jueves, abril 08, 2010

python: wave or wave

import itertools, math, time
for x in itertools.count(0): print "".join([time.sleep(0.003)][0:0] + [y in [int(math.cos(x*3.14/(50 + 25*math.cos((x/50.0)*3.14/50)))*37 + 37), int(math.sin(x*3.14/(50 + 25*math.sin((x/50.0)*3.14/50)))*37 + 37)] and '#' or ' ' for y in xrange(75)])

No hay comentarios.: