Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1 8 abeturtspiral.py
- from turtle import Turtle
- abe = Turtle()
- # abe.dot(100)
- # use radius
- def draw_circle(name, r, color):
- name.color(color)
- name.dot(r*2)
- # move the start point
- abe.penup()
- abe.goto(-100, 100) # HMMM? how to move the whole spiral?
- abe.pendown()
- draw_circle(abe,5, "red")
- abe.penup()
- abe.goto(0, 0)
- abe.pendown()
- # archimedes
- draw_circle(abe,5, "green") # starts at 0,0
- '''
- abe.goto( 0, 0)
- draw_circle(abe,2, "red")'''
- abe.goto( 2, 15)
- draw_circle(abe,5, "green")
- abe.goto( 10, 30)
- draw_circle(abe,5, "green")
- abe.goto( 22, 40)
- draw_circle(abe,5, "green")
- abe.goto( 38, 50)
- draw_circle(abe,5, "green")
- abe.goto( 60, 60)
- draw_circle(abe,5, "green")
- abe.goto( 90, 60)
- draw_circle(abe,5, "green")
- abe.goto( 120, 50)
- draw_circle(abe,5, "green")
- abe.goto( 150, 30)
- draw_circle(abe,5, "green")
- abe.goto( 180, 0)
- draw_circle(abe,5, "green")
- abe.goto( 205, -40)
- draw_circle(abe,5, "green")
Add Comment
Please, Sign In to add comment