generated from mwc/lab_turtle
Hi! As per your suggestion I tried out the olympic rings. What I learned from this: it really is an arrow (with a direction) and not a coordinate system. This became clear especially while drawing the last circle (yellow). Overall I am enjoying learning! Thanks, professor.
174 lines
2.2 KiB
Python
174 lines
2.2 KiB
Python
from turtle import (
|
|
forward,
|
|
back,
|
|
left,
|
|
right,
|
|
penup,
|
|
pendown,
|
|
color,
|
|
pensize,
|
|
speed,
|
|
setheading,
|
|
circle,
|
|
goto,
|
|
begin_fill,
|
|
end_fill,
|
|
fillcolor,
|
|
)
|
|
|
|
#FILL TESTING
|
|
|
|
# pensize(3)
|
|
|
|
# penup()
|
|
# goto(-100,0)
|
|
# pendown()
|
|
|
|
|
|
# color('steel blue')
|
|
# fillcolor('red')
|
|
|
|
# begin_fill()
|
|
# circle(50)
|
|
# end_fill()
|
|
# penup()
|
|
# forward(80)
|
|
# color('black')
|
|
# fillcolor('gold')
|
|
# pendown()
|
|
|
|
# begin_fill()
|
|
# circle(50)
|
|
# end_fill()
|
|
|
|
#########################
|
|
|
|
#OLYMPIC RINGS
|
|
|
|
pensize(3)
|
|
|
|
penup()
|
|
back(100)
|
|
pendown()
|
|
color('steel blue')
|
|
circle(50)
|
|
penup()
|
|
forward(80)
|
|
pendown()
|
|
color('black')
|
|
circle(50)
|
|
penup()
|
|
forward(80)
|
|
pendown()
|
|
color('red')
|
|
circle(50)
|
|
penup()
|
|
back(90)
|
|
right(90)
|
|
forward(30)
|
|
pendown()
|
|
color('olive drab')
|
|
circle(50)
|
|
penup()
|
|
right(90)
|
|
forward(80)
|
|
left(90)
|
|
pendown()
|
|
color('gold')
|
|
circle(50)
|
|
|
|
|
|
##################################
|
|
|
|
#RAINBOW STARS
|
|
|
|
# pensize(2)
|
|
|
|
# color('red')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('chocolate')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('gold')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('yellow green')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('steel blue')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
|
|
# penup()
|
|
# back(250)
|
|
# right(90)
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# pendown()
|
|
|
|
# color('red')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('chocolate')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('gold')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('yellow green')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('steel blue')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
|
|
# penup()
|
|
# right(180)
|
|
# forward(200)
|
|
# right(360 * 2 / 5)
|
|
# pendown()
|
|
|
|
# color('red')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('chocolate')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('gold')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('yellow green')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('steel blue')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
|
|
# penup()
|
|
# goto(100,100)
|
|
# forward(100)
|
|
# pendown()
|
|
|
|
# color('red')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('chocolate')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('gold')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('yellow green')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
# color('steel blue')
|
|
# forward(100)
|
|
# right(360 * 2 / 5)
|
|
|
|
|
|
|
|
|
|
|
|
input()
|