Skip to main content
gained 1 character with PSSurface, lost one character with None (but now it won't create a '_' file anymore).
Source Link

Python 2 (with cairo) - 239

from cairo import* s=SVGSurfaces=PSSurface('_'None,99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Results:

results

Python 2 (with cairo) - 239

from cairo import* s=SVGSurface('_',99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Results:

results

Python 2 (with cairo) - 239

from cairo import* s=PSSurface(None,99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Results:

results

added 74 characters in body
Source Link

Python 2 (with cairo) - 239

from cairo import* s=SVGSurface('_',99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Results:

results

Python 2 (with cairo) - 239

from cairo import* s=SVGSurface('_',99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Python 2 (with cairo) - 239

from cairo import* s=SVGSurface('_',99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o') 

Results:

results

Source Link

Python 2 (with cairo) - 239

from cairo import* s=SVGSurface('_',99,99) g=Context(s) g.move_to(30,20) a=str([34,456,3455,568788,3454445555][input()-1]) f=6.28 for c in a+a[::-1]:exec'g.rel_line_to(8,0);g.rotate(f/int(a[0]));'*int(c);f=-f g.stroke() s.write_to_png('o')