From 801ba8edbf2a7bc571b6266b07786720ba8d4ca7 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Sep 2024 23:36:19 -0400 Subject: [PATCH] I finished the function for drawing the letter A. I am frustrated that my commit messages keep failing to save and I have to keep rewriting them. First I wrote the function and it was very long. Then, I made functions for the eyes and ghosty skirt, since I will use them in other letters. I feel like I should use loops but I don't want to mess up my letter. I tried one way, and it didn't work, so I think I will try for the letter B and then go back and change A as needed. --- typeface.py | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/typeface.py b/typeface.py index b966bef..db3a342 100644 --- a/typeface.py +++ b/typeface.py @@ -12,8 +12,55 @@ from turtle import * from math import sqrt +def draw_eye(unit): + right(45) + pendown() + fillcolor('black') + begin_fill() + circle(unit/2, 90) + circle(unit/12, 90) + circle(unit/2, 90) + circle(unit/12, 90) + end_fill() + penup() + left(45) + +def draw_ghostyskirt(unit): + circle(-unit/4, 180) + circle(unit/4, 180) + circle(-unit/4, 180) + circle(unit/4, 180) + circle(-unit/4, 180) + circle(unit/4, 180) + circle(-unit/4, 180) + def draw_letter_a(unit): - pass + left(90) + penup() + forward(unit/4) + pendown() + forward(15*unit/4) + circle(-4*unit, 180) + forward(15*unit/4) + draw_ghostyskirt(unit) + forward(2*unit) + circle(unit/2, 180) + forward(2*unit) + draw_ghostyskirt(unit) + penup() + forward(15*unit/4) + right(90) + forward(4*unit) + pendown() + circle(unit) + penup() + circle(unit, 90) + forward(5*unit/4) + draw_eye(unit) + left(90) + forward(2*unit) + draw_eye(-unit) + def draw_letter_b(unit): pass