Start New Discussion within our Software Development Community

Python module turtle makes it simple to draw graphics art similar to art done by the Logo language.

''' turtle_loop_art101.py
using Python module turtle to draw circles in loop the loop fashion
tested with Python27 and Python33  by  vegaseat  17oct2013
'''

import turtle as tu

def draw_loop(loops, size):
    '''draw a circle/loop'''
    for k in range(loops):
        tu.right(360.0/loops)
        tu.forward(size)

def start_draw(loops, size):
    '''positions loops'''
    for k in range(loops):
        tu.right(360.0/loops)
        draw_loop(loops, size)
        

tu.title("fun with loops/circles")

tu.hideturtle()
tu.bgcolor("blue")
tu.pencolor("yellow")
tu.pensize(2)

tu.speed('fastest')
# comment out tracer() for set turtle speeds
tu.tracer(36, 0)

loops = 36
size = 24
start_draw(loops, size)

# wait till corner x is clicked
tu.done()
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.