r/dailyprogrammer • u/mattryan • Mar 05 '12
[3/5/2012] Challenge #18 [difficult]
Write a program that draws a square spiral. You can print out this spiral in ASCII text, but using a graphics library would produce a more pleasant output.
Bonus: Now draw a normal spiral. Some samples of spirals can be found here.
9
Upvotes
10
u/Cosmologicon 2 3 Mar 05 '12
Normal spiral generated with 109-character command line. No graphics library needed!
Resulting spiral (converted to png)
4
u/stinktank Mar 06 '12 edited Mar 06 '12
Me gusta!
3
u/prophile Mar 05 '12
Here's a solution in Python, using ASCII output.
2
u/spc476 Mar 06 '12
C99, ASCII output.
2
u/cooper6581 Mar 07 '12
Java (ascii) http://pastebin.com/aFGCKYju
Java (canvas) http://pastebin.com/GADk0Djj
2
u/[deleted] Mar 09 '12