All pastes #993293 Raw Edit

tnorth

public python v1 · immutable
#993293 ·published 2008-04-22 14:59 UTC
rendered paste body
#!/usr/bin/env pythonfrom math import sinimport os,sysdef main():    count=0    if len(sys.argv) < 1:      print "Pas d'arguments"    else :        count = int(sys.argv[1])    a=euler2(0.4,2,0.02)    for i in range (count):        print str(a.next())def euler2(a0_x, a0_y, step):        while(1):                a0_y=a0_y+(6*sin(5*a0_x)-a0_y)*step                a0_x+=step                yield str(a0_x)+"\t"+str(a0_y)if __name__ == "__main__":    main()