How was this Python Turtle graphic made?
<p>My friend showed me this amazing image that she made using Python's inbuilt <a href="https://docs.python.org/2/library/turtle.html" rel="nofollow">Turtle module</a> and challenged me to find out how it was made. She gave me one hint: the image was produced with 10 lines of code. </p>

<p><img src="http://i.imgur.com/M8c7BiP.jpg" alt="10 Line Turtle Graphic"></p>

<p>From my question you probably already know that I have no clue. I've tried a whole heap of things, but I don't know how she made a filled in circle with <em>such</em> detailed patterns in only 10 lines. I've given up on figuring it out myself, and my friend won't tell me, so anyone who can produce 10 lines that make a similar image gets all the credit for figuring it out :P</p>

<p>Note: I'm not sure if this is appropriate for StackOverflow, so I'm happy to ask elsewhere (let me know), but this <em>was</em> made using Python code, so I thought someone on a programming forum might have the experience to work it out.</p>

<p>Here is what I believe your looking for:</p>

<pre><code>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" for more information.
&gt;&gt;&gt; import turtle
&gt;&gt;&gt; t = turtle.Pen()
&gt;&gt;&gt; for i in range(1000):
...     t.forward(100)
...     t.backward(100)
...     t.left(79)
... 
</code></pre>

<p>output:</p>

<p><a href="http://i.stack.imgur.com/Ue8QG.png" rel="nofollow"><img src="http://i.stack.imgur.com/Ue8QG.png" alt="enter image description here"></a></p>

<p>It is a miniature example of the output you showed in your question.
Basicly the way that is works is that each time the turtle pen goes forward and comes back, the pen turns. This is repeated multiple times, to create those 'detailed patterns'. Also, your friend may have mislead you a bit, as this is much shorter than ten lines.</p>

python graphics turtle-graphics