my friend showed me amazing image made using python's inbuilt turtle module , challenged me find out how made. gave me 1 hint: image produced 10 lines of code.
from question know have no clue. i've tried whole heap of things, don't know how made filled in circle such detailed patterns in 10 lines. i've given on figuring out myself, , friend won't tell me, can produce 10 lines make similar image gets credit figuring out :p
note: i'm not sure if appropriate stackoverflow, i'm happy ask elsewhere (let me know), was made using python code, thought on programming forum might have experience work out.
here believe looking for:
python 2.7.5 (default, mar 9 2014, 22:15:05) [gcc 4.2.1 compatible apple llvm 5.0 (clang-500.0.68)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import turtle >>> t = turtle.pen() >>> in range(1000): ... t.forward(100) ... t.backward(100) ... t.left(79) ...
output:
it miniature example of output showed in question. basicly way works each time turtle pen goes forward , comes back, pen turns. repeated multiple times, create 'detailed patterns'. also, friend may have mislead bit, shorter ten lines.
Comments
Post a Comment