generated from mwc/problemset_typeface
	I added fonts for letters A, D, T, and K.
All of my letters work perfectly fine n their own. However, when I check with commit, some of my grids are rotated and I am not sure why. but I submit my work anyway. It did frustrate me that my end-work didn't look how it was supposed to, but individually they look perfectly fine. I spent a good amount of time catching up on this course work so I think being in the same productive flow for a while helped me get this assignment done. I did have to re-do the curves multiple times, but I knew what I wanted my end-product to look like so I did my best.
This commit is contained in:
		
							
								
								
									
										91
									
								
								typeface.py
									
									
									
									
									
								
							
							
						
						
									
										91
									
								
								typeface.py
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
# typeface.py
 | 
			
		||||
#typeface.py
 | 
			
		||||
# By Chris Proctor and _________
 | 
			
		||||
 | 
			
		||||
# Contains one function for each letter in the English alphabet. 
 | 
			
		||||
@@ -9,11 +9,28 @@
 | 
			
		||||
# move the turtle along the diagonal of a square with side length x, 
 | 
			
		||||
# the turtle should move a distance of sqrt(x)
 | 
			
		||||
 | 
			
		||||
from turtle import *
 | 
			
		||||
from turtle import circle, left,right,forward,backward, penup, pendown, pencolor,pensize
 | 
			
		||||
from math import sqrt
 | 
			
		||||
 | 
			
		||||
def draw_letter_a(unit):
 | 
			
		||||
    pass
 | 
			
		||||
def fly(distance):
 | 
			
		||||
    penup()
 | 
			
		||||
    forward(distance)
 | 
			
		||||
    pendown()
 | 
			
		||||
 | 
			
		||||
def draw_letter_a(size):
 | 
			
		||||
    fly(size)
 | 
			
		||||
    left(60)
 | 
			
		||||
    forward(2*(8*size)/sqrt(3))
 | 
			
		||||
    right(150)
 | 
			
		||||
    forward(8*size)
 | 
			
		||||
    left(180)
 | 
			
		||||
    fly(0.70*size)
 | 
			
		||||
    circle((3*size), 90)
 | 
			
		||||
    circle((0.50*size), 180)
 | 
			
		||||
    right(15)
 | 
			
		||||
    circle((6*size), 15)
 | 
			
		||||
    forward(3*size)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def draw_letter_b(unit):
 | 
			
		||||
    pass
 | 
			
		||||
@@ -21,8 +38,29 @@ def draw_letter_b(unit):
 | 
			
		||||
def draw_letter_c(unit):
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
def draw_letter_d(unit):
 | 
			
		||||
    pass
 | 
			
		||||
def draw_letter_d(size):
 | 
			
		||||
    fly(3*size)
 | 
			
		||||
    left(90)
 | 
			
		||||
    fly(8*size)
 | 
			
		||||
    right(180)
 | 
			
		||||
    circle(-18*size,25)
 | 
			
		||||
    circle(-0.70*size,280)
 | 
			
		||||
    forward(size)
 | 
			
		||||
    circle(5*size,20)
 | 
			
		||||
    left(10)
 | 
			
		||||
    circle(6*size,20)
 | 
			
		||||
    left(10)
 | 
			
		||||
    circle(6*size,20)
 | 
			
		||||
    left(10)
 | 
			
		||||
    circle(4*size,20)
 | 
			
		||||
    left(10)
 | 
			
		||||
    circle(10*size,15)
 | 
			
		||||
    circle(3*size,50)
 | 
			
		||||
    circle(5*size,60)
 | 
			
		||||
    circle(0.50*size, 180)
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def draw_letter_e(unit):
 | 
			
		||||
    pass
 | 
			
		||||
@@ -42,8 +80,22 @@ def draw_letter_i(unit):
 | 
			
		||||
def draw_letter_j(unit):
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
def draw_letter_k(unit):
 | 
			
		||||
    pass
 | 
			
		||||
def draw_letter_k(size):
 | 
			
		||||
    fly(2*size)
 | 
			
		||||
    left(88)
 | 
			
		||||
    forward(8*size)
 | 
			
		||||
    right(88)
 | 
			
		||||
    fly(3*size)
 | 
			
		||||
    right(100)
 | 
			
		||||
    circle(-7*size, 50)
 | 
			
		||||
    circle(-1.5*size, 50)
 | 
			
		||||
    right(90)
 | 
			
		||||
    circle(-2*size, 160)
 | 
			
		||||
    circle(3*size,50)
 | 
			
		||||
    circle(0.5*size, 90)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def draw_letter_l(unit):
 | 
			
		||||
    pass
 | 
			
		||||
@@ -69,8 +121,27 @@ def draw_letter_r(unit):
 | 
			
		||||
def draw_letter_s(unit):
 | 
			
		||||
    pass
 | 
			
		||||
 | 
			
		||||
def draw_letter_t(unit):
 | 
			
		||||
    pass
 | 
			
		||||
def draw_letter_t(size):
 | 
			
		||||
    fly(4*size)
 | 
			
		||||
    left(90)
 | 
			
		||||
    fly(7*size)
 | 
			
		||||
    right(185)
 | 
			
		||||
    forward(6*size)
 | 
			
		||||
    left(5)
 | 
			
		||||
    circle(size,90)
 | 
			
		||||
    circle(3*size, 15)
 | 
			
		||||
    forward(0.5*size)
 | 
			
		||||
    right(190)
 | 
			
		||||
    fly(3.75*size)
 | 
			
		||||
    right(90)
 | 
			
		||||
    fly(6*size)
 | 
			
		||||
    circle(-2*size, 25)
 | 
			
		||||
    circle(-size, 85)
 | 
			
		||||
    forward(2*size)
 | 
			
		||||
    left(5)
 | 
			
		||||
    circle(3*size, 30)
 | 
			
		||||
    circle(size, 60)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def draw_letter_u(unit):
 | 
			
		||||
    pass
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user