project_drawing/drawing.py

159 lines
2.3 KiB
Python

# drawing.py
# ----------
# By ____(you)___________
#
# (Briefly describe what this program does.)
from turtle import *
from superturtle.animation import animate
bgcolor("black")
def fly(distance):
penup()
forward(distance)
pendown()
def sun():
color("yellow")
fillcolor("yellow")
begin_fill()
fly(40)
left(90)
circle(40)
right (90)
end_fill()
def orbit():
color("white")
fly(20)
left(90)
circle(60)
right(90)
fly(20)
left(90)
circle(80)
right(90)
fly(20)
left(90)
circle(100)
right(90)
fly(20)
left(90)
circle(120)
right(90)
fly(20)
left(90)
circle(140)
right(90)
fly(20)
left(90)
circle(160)
right(90)
fly(20)
left(90)
circle(180)
right(90)
fly(20)
left(90)
circle(200)
right(90)
right(180)
fly(200)
right(180)
def mercury():
fly(60)
color("thistle")
fillcolor("thistle")
begin_fill()
circle(3)
end_fill()
def venus():
left(126.869897646)
fly(100)
color("goldenrod")
fillcolor("goldenrod")
begin_fill()
circle(8)
end_fill()
left(53.1301)
def earth():
left(38.659808)
fly(128.062484749)
color("forest green")
fillcolor("forest green")
begin_fill()
circle(9)
end_fill()
left(51.340191)
def mars():
left(39.805571)
fly(156.204993518)
color("red")
fillcolor("red")
begin_fill()
circle(5)
end_fill()
left(50.194428)
def jupiter():
left(40.601294)
fly(184.390889146)
color("peru")
fillcolor("peru")
begin_fill()
circle(15)
end_fill()
left(49.398705)
def saturn():
left(41.328658)
fly(212.602916255)
color("pale violet red")
fillcolor("pale violet red")
begin_fill()
circle(13)
end_fill()
left(48.671341)
def uranus():
left(41.663539)
fly(240.831891576)
color("light blue")
fillcolor("light blue")
begin_fill()
circle(11)
end_fill()
left(48.366460)
def neptune():
left(41.987212)
fly(269.072480941)
color("blue")
fillcolor("blue")
begin_fill()
circle(11)
end_fill()
sun()
orbit()
mercury()
venus()
earth()
mars()
jupiter()
saturn()
uranus()
neptune()
done()