generated from mwc/project_drawing
82 lines
1.5 KiB
Python
82 lines
1.5 KiB
Python
# drawing.py
|
|
# ----------
|
|
# By ____(you)___________
|
|
#
|
|
# (Briefly describe what this program does.)
|
|
|
|
from turtle import *
|
|
from superturtle.animation import animate
|
|
|
|
|
|
def fly(distance):
|
|
penup()
|
|
forward(distance)
|
|
pendown()
|
|
|
|
|
|
def sun():
|
|
fillcolor("yellow")
|
|
begin_fill()
|
|
fly(40)
|
|
left(90)
|
|
circle(40)
|
|
end_fill()
|
|
left(90)
|
|
fly(40)
|
|
|
|
|
|
for frame in animate(80, loop=True):
|
|
sun()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("thistle")
|
|
begin_fill()
|
|
circle(3)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("goldenrod")
|
|
begin_fill()
|
|
circle(8)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("forest green")
|
|
begin_fill()
|
|
circle(9)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("red")
|
|
begin_fill()
|
|
circle(4)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("peru")
|
|
begin_fill()
|
|
circle(25)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("pale violet red")
|
|
begin_fill()
|
|
circle(20)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("light blue")
|
|
begin_fill()
|
|
circle(15)
|
|
end_fill()
|
|
with frame.rotate(0, 360):
|
|
fly(40)
|
|
fillcolor("midnight blue")
|
|
begin_fill()
|
|
circle(15)
|
|
end_fill()
|
|
done()
|
|
|
|
|
|
|