generated from mwc/project_drawing
73 lines
1002 B
Python
73 lines
1002 B
Python
# drawing.py
|
|
# ----------
|
|
# By ____(you)___________
|
|
#
|
|
# (Briefly describe what this program does.)
|
|
|
|
from turtle import *
|
|
from ellipse import *
|
|
|
|
|
|
def triangle(size):
|
|
right(245)
|
|
forward(60)
|
|
left(135)
|
|
forward(60)
|
|
left(111)
|
|
forward(47)
|
|
penup()
|
|
forward(70)
|
|
pendown()
|
|
|
|
def quarter_arc_right(radius):
|
|
"Draws a quarter of an arc, turning to the right."
|
|
circle(-radius, 90)
|
|
|
|
def quarter_arc_left(radius):
|
|
"Draws a quarter of an arc, turning to the left."
|
|
circle(radius, 90)
|
|
|
|
|
|
for I in range(2):
|
|
triangle(20)
|
|
|
|
right(180)
|
|
penup()
|
|
forward(138)
|
|
left(90)
|
|
forward(120)
|
|
right(90)
|
|
pendown()
|
|
forward(25)
|
|
left(125)
|
|
forward(50)
|
|
left(101)
|
|
forward(57)
|
|
left(134)
|
|
forward(43)
|
|
penup()
|
|
forward(25)
|
|
left(125)
|
|
forward(50)
|
|
pendown()
|
|
quarter_arc_left(23)
|
|
penup()
|
|
right(180)
|
|
quarter_arc_right(23)
|
|
left(107)
|
|
pendown()
|
|
quarter_arc_right(23)
|
|
penup()
|
|
quarter_arc_right(92)
|
|
left(90)
|
|
|
|
ellipse(25,12.5,50)
|
|
penup()
|
|
right(145)
|
|
forward(90)
|
|
left(30)
|
|
ellipse(25,12.5,50)
|
|
input()
|
|
|
|
|