generated from mwc/problemset_typeface
I wrote code to draw the letters abcdefghijklmnop
This commit is contained in:
267
typeface.py
267
typeface.py
@@ -124,42 +124,283 @@ def draw_letter_e(unit):
|
||||
penup()
|
||||
forward(unit * 4 * sqrt(2))
|
||||
left(135)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(135)
|
||||
penup()
|
||||
forward(unit * 4 * sqrt(2))
|
||||
left(135)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 6)
|
||||
right(180)
|
||||
|
||||
|
||||
def draw_letter_f(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(135)
|
||||
penup()
|
||||
forward(unit * 4 * sqrt(2))
|
||||
left(135)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(135)
|
||||
penup()
|
||||
forward(unit * 4 * sqrt(2))
|
||||
left(315)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_g(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
right(90)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_h(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
left(90)
|
||||
forward(unit * 4)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
penup()
|
||||
forward(unit * 6)
|
||||
right(180)
|
||||
|
||||
|
||||
def draw_letter_i(unit):
|
||||
pass
|
||||
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
right(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
penup()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_j(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
penup()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_k(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
left(135)
|
||||
pendown()
|
||||
forward(unit * 4 * sqrt(2))
|
||||
right(135)
|
||||
penup()
|
||||
forward(unit * 8)
|
||||
pendown()
|
||||
right(135)
|
||||
forward(unit * 4 * sqrt(2))
|
||||
left(135)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_l(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(180)
|
||||
penup()
|
||||
forward(unit * 8)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 4)
|
||||
left(180)
|
||||
penup()
|
||||
forward(unit * 6)
|
||||
left(180)
|
||||
|
||||
def draw_letter_m(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(90)
|
||||
forward(unit * 8)
|
||||
left(180)
|
||||
penup()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
right(90)
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
penup()
|
||||
forward(unit * 6)
|
||||
right(180)
|
||||
|
||||
def draw_letter_n(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
penup()
|
||||
forward(unit * 6)
|
||||
right(180)
|
||||
|
||||
def draw_letter_o(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_p(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(unit * 8)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
left(90)
|
||||
penup()
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_q(unit):
|
||||
pass
|
||||
penup()
|
||||
forward(unit * 2)
|
||||
left(90)
|
||||
forward(unit)
|
||||
pendown()
|
||||
forward(unit * 7)
|
||||
right(90)
|
||||
forward(unit * 4)
|
||||
right(90)
|
||||
forward(unit * 7)
|
||||
penup()
|
||||
forward(unit)
|
||||
right(135)
|
||||
pendown()
|
||||
forward(unit * 2)
|
||||
left(135)
|
||||
penup()
|
||||
forward(unit * sqrt(2))
|
||||
left(90)
|
||||
forward(unit)
|
||||
pendown()
|
||||
forward(unit * 3)
|
||||
left(90)
|
||||
penup()
|
||||
forward(unit)
|
||||
right(90)
|
||||
forward(unit * 2)
|
||||
right(180)
|
||||
|
||||
def draw_letter_r(unit):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user