Kathryn Odell-Hamilton

I created the letters A, D, E, I M, N, O, P, R, T which will be used for
PIET MONDRIAN within Unit 1, Drawing Project.

In the beginning I thought I had to define the size of the unit,
but I didn't have to because the unit would be multiplied by the number
of blocks such as forward(unit*2). That was misleading and you explained
it to me.

I did a lot of testing and using the proof.py to make sure everything
lined up correctly. And I used 45 and 135 degree angles with
code such as forward(size * sqrt(2)). The "M" and "N" were a little
tricky with determining left or right with the angles.

My feelings were fine creating this because of my typography background.
I did a considerable amount of hand lettering in undergraduate student
and working as a graphic designer before the desktop era. I have a solid
foundation in typography and formatting.

One thing I would want to go back to define sections of letters that
can be used for other letters, mostly the stems of the letter. It
would reduce the repetitive code.

Not sure if a range and or a for loop can be incorporated into the code.
I'd have to re-read Iteration for a better understanding and application.
This commit is contained in:
kathrynoh23 2023-08-15 21:39:22 -04:00
parent 09230b6884
commit 50a5f7a586
2 changed files with 391 additions and 49 deletions

73
poetry.lock generated
View File

@ -285,13 +285,13 @@ files = [
[[package]]
name = "pygments"
version = "2.15.1"
version = "2.16.1"
description = "Pygments is a syntax highlighting package written in Python."
optional = false
python-versions = ">=3.7"
files = [
{file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"},
{file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"},
{file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"},
{file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"},
]
[package.extras]
@ -342,13 +342,13 @@ files = [
[[package]]
name = "sphinx"
version = "7.1.1"
version = "7.1.2"
description = "Python documentation generator"
optional = false
python-versions = ">=3.8"
files = [
{file = "sphinx-7.1.1-py3-none-any.whl", hash = "sha256:4e6c5ea477afa0fb90815210fd1312012e1d7542589ab251ac9b53b7c0751bce"},
{file = "sphinx-7.1.1.tar.gz", hash = "sha256:59b8e391f0768a96cd233e8300fe7f0a8dc2f64f83dc2a54336a9a84f428ff4e"},
{file = "sphinx-7.1.2-py3-none-any.whl", hash = "sha256:d170a81825b2fcacb6dfd5a0d7f578a053e45d3f2b153fecc948c37344eb4cbe"},
{file = "sphinx-7.1.2.tar.gz", hash = "sha256:780f4d32f1d7d1126576e0e5ecc19dc32ab76cd24e950228dcf7b1f6d3d9e22f"},
]
[package.dependencies]
@ -393,45 +393,54 @@ docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-ta
[[package]]
name = "sphinxcontrib-applehelp"
version = "1.0.4"
version = "1.0.7"
description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books"
optional = false
python-versions = ">=3.8"
python-versions = ">=3.9"
files = [
{file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"},
{file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"},
{file = "sphinxcontrib_applehelp-1.0.7-py3-none-any.whl", hash = "sha256:094c4d56209d1734e7d252f6e0b3ccc090bd52ee56807a5d9315b19c122ab15d"},
{file = "sphinxcontrib_applehelp-1.0.7.tar.gz", hash = "sha256:39fdc8d762d33b01a7d8f026a3b7d71563ea3b72787d5f00ad8465bd9d6dfbfa"},
]
[package.dependencies]
Sphinx = ">=5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-devhelp"
version = "1.0.2"
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document."
version = "1.0.5"
description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp documents"
optional = false
python-versions = ">=3.5"
python-versions = ">=3.9"
files = [
{file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"},
{file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"},
{file = "sphinxcontrib_devhelp-1.0.5-py3-none-any.whl", hash = "sha256:fe8009aed765188f08fcaadbb3ea0d90ce8ae2d76710b7e29ea7d047177dae2f"},
{file = "sphinxcontrib_devhelp-1.0.5.tar.gz", hash = "sha256:63b41e0d38207ca40ebbeabcf4d8e51f76c03e78cd61abe118cf4435c73d4212"},
]
[package.dependencies]
Sphinx = ">=5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-htmlhelp"
version = "2.0.1"
version = "2.0.4"
description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files"
optional = false
python-versions = ">=3.8"
python-versions = ">=3.9"
files = [
{file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"},
{file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"},
{file = "sphinxcontrib_htmlhelp-2.0.4-py3-none-any.whl", hash = "sha256:8001661c077a73c29beaf4a79968d0726103c5605e27db92b9ebed8bab1359e9"},
{file = "sphinxcontrib_htmlhelp-2.0.4.tar.gz", hash = "sha256:6c26a118a05b76000738429b724a0568dbde5b72391a688577da08f11891092a"},
]
[package.dependencies]
Sphinx = ">=5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["html5lib", "pytest"]
@ -452,30 +461,36 @@ test = ["flake8", "mypy", "pytest"]
[[package]]
name = "sphinxcontrib-qthelp"
version = "1.0.3"
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document."
version = "1.0.6"
description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp documents"
optional = false
python-versions = ">=3.5"
python-versions = ">=3.9"
files = [
{file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"},
{file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"},
{file = "sphinxcontrib_qthelp-1.0.6-py3-none-any.whl", hash = "sha256:bf76886ee7470b934e363da7a954ea2825650013d367728588732c7350f49ea4"},
{file = "sphinxcontrib_qthelp-1.0.6.tar.gz", hash = "sha256:62b9d1a186ab7f5ee3356d906f648cacb7a6bdb94d201ee7adf26db55092982d"},
]
[package.dependencies]
Sphinx = ">=5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]
[[package]]
name = "sphinxcontrib-serializinghtml"
version = "1.1.5"
description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)."
version = "1.1.8"
description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)"
optional = false
python-versions = ">=3.5"
python-versions = ">=3.9"
files = [
{file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"},
{file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"},
{file = "sphinxcontrib_serializinghtml-1.1.8-py3-none-any.whl", hash = "sha256:27849e7227277333d3d32f17c138ee148a51fa01f888a41cd6d4e73bcabe2d06"},
{file = "sphinxcontrib_serializinghtml-1.1.8.tar.gz", hash = "sha256:aaf3026335146e688fd209b72320314b1b278320cf232e3cda198f873838511a"},
]
[package.dependencies]
Sphinx = ">=5"
[package.extras]
lint = ["docutils-stubs", "flake8", "mypy"]
test = ["pytest"]

View File

@ -1,3 +1,4 @@
# typeface.py
# By Chris Proctor and _________
@ -31,19 +32,19 @@ def draw_letter_a(unit):
left(90)
forward(unit*2)
left(90)
forward(unit*6.5)
forward(unit*6)
# 45 degree top section of letter
left(45)
forward(unit*2)
left(45)
forward(unit*3)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*2)
left(45)
forward(unit * 2 * sqrt(2))
left(45)
#remander of left stem section of letter
forward(unit*6.5)
forward(unit*6)
left(90)
#interior cross bar section
@ -57,9 +58,9 @@ def draw_letter_a(unit):
left(90)
forward(unit*1)
left(45)
forward(unit*1.5)
forward(unit * 1 * sqrt(2))
left(90)
forward(unit*1.5)
forward(unit * 1 * sqrt(2))
left(45)
forward(unit*1)
@ -69,6 +70,8 @@ def draw_letter_a(unit):
forward(unit*2)
left(90)
forward(unit*4)
# Start position
left(90)
def draw_letter_b(unit):
@ -78,7 +81,51 @@ def draw_letter_c(unit):
pass
def draw_letter_d(unit):
pass
penup()
forward(unit*1)
"Draw base and right side of D"
pendown()
forward(unit*4)
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*4)
left(45)
forward(unit * 2 * sqrt(2))
"Top and left side of D"
left(45)
forward(unit*4)
left(90)
forward(unit*8)
"Inner section of D"
penup()
left(180)
forward(unit*2)
right(90)
forward(unit*2)
pendown()
forward(unit*1)
left(45)
forward(unit * 1 * sqrt(2))
left(45)
forward(unit*2)
left(45)
forward(unit * 1 * sqrt(2))
left(45)
forward(unit*1)
left(90)
forward(unit*4)
"Back to beginning"
penup()
right(90)
forward(unit*3)
left(90)
forward(unit*2)
left(90)
def draw_letter_e(unit):
@ -86,10 +133,39 @@ def draw_letter_e(unit):
forward(unit*1)
pendown()
#Base section
forward(unit*7)
#Base leg section
forward(unit*6)
left(90)
forward(unit*2)
left(90)
forward(unit*4)
right(90)
# middle section
forward(unit*1)
right(90)
forward(unit*4)
left(90)
forward(unit*2)
left(90)
forward(unit*4)
right(90)
# arm (top) section
forward(unit*1)
right(90)
forward(unit*4)
left(90)
forward(unit*2)
left(90)
forward(unit*6)
# completing stem of letter
left(90)
forward(unit*8)
# Start position
left(90)
forward(unit)
def draw_letter_f(unit):
@ -105,17 +181,19 @@ def draw_letter_i(unit):
# penup to move into position to draw
penup()
forward(unit*2)
forward(unit*3)
pendown()
#Stem of letter "I"
forward(unit*2)
left(90)
forward(unit*5)
forward(unit*8)
left(90)
forward(unit*2)
left(90)
forward(unit*4)
forward(unit*8)
#Start position
left(90)
def draw_letter_j(unit):
@ -128,28 +206,277 @@ def draw_letter_l(unit):
pass
def draw_letter_m(unit):
pass
penup()
forward(unit*1)
"beginning stem section and bottom section of N"
pendown()
forward(unit*2)
left(90)
forward(unit*4)
right(135)
forward(unit * 1 * sqrt(2))
left(90)
forward(unit * 1 * sqrt(2))
right(45)
right(90)
forward(unit*4)
left(90)
forward(unit*2)
"Right stem section and top of N"
left(90)
forward(unit*8)
left(90)
forward(unit*2)
left(45)
forward(unit * 1 * sqrt(2))
right(90)
forward(unit * 1 * sqrt(2))
left(45)
forward(unit*2)
"Left stem of N"
left(90)
forward(unit*8)
"Back to beginning"
penup()
right(90)
forward(unit*1)
right(180)
def draw_letter_n(unit):
pass
penup()
forward(unit*1)
"1st stem section and angle of N"
pendown()
forward(unit*2)
left(90)
forward(unit*3)
right(135)
forward(unit * 3 * sqrt(2))
left(45)
forward(unit*1)
"Right and top of N"
left(90)
forward(unit*8)
left(90)
forward(unit*2)
left(90)
forward(unit*3)
right(135)
forward(unit * 3 * sqrt(2))
left(45)
forward(unit*1)
"Left side of stem N"
left(90)
forward(unit*8)
"Back to beginning"
penup()
right(90)
forward(unit*1)
right(180)
def draw_letter_o(unit):
pass
penup()
forward(unit*3)
"Draw base of O"
pendown()
forward(unit*2)
"Right side and top of O"
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*4)
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*2)
"Left side of O"
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*4)
left(45)
forward(unit * 2 * sqrt(2))
"Inner section of O"
penup()
left(135)
forward(unit*3)
right(90)
pendown()
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
"Back to start"
penup()
right(90)
forward(unit*3)
left(90)
forward(unit*3)
left(90)
def draw_letter_p(unit):
pass
penup()
forward(unit*1)
pendown()
"Draw bottom and right side of stem"
forward(unit*2)
left(90)
forward(unit*2)
"Right and top section of P"
right(90)
forward(unit*2)
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*2)
left(45)
forward(unit * 2 * sqrt(2))
left(45)
forward(unit*4)
"Left section of stem to bottom"
left(90)
forward(unit*8)
"Inner section of P"
penup()
left(180)
forward(unit*4)
right(90)
forward(unit*2)
pendown()
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
"Pen Back to the beginning"
penup()
right(90)
forward(unit*3)
left(90)
forward(unit*4)
left(90)
def draw_letter_q(unit):
pass
def draw_letter_r(unit):
pass
penup()
forward(unit*1)
pendown()
"1st & 2nd stem sections of R"
forward(unit*2)
left(90)
forward(unit*3)
right(90)
forward(unit*2)
right(90)
forward(unit*3)
left(90)
forward(unit*2)
left(90)
forward(unit*3)
"Angled right sections of R"
left(45)
forward(unit * 1 * sqrt(2))
right(90)
forward(unit * 1 * sqrt(2))
left(45)
forward(unit*2)
left(45)
forward(unit * 1 * sqrt(2))
left(45)
"Top and left stem of R"
forward(unit*5)
left(90)
forward(unit*8)
"Inner section of R"
penup()
left(180)
forward(unit*4)
right(90)
forward(unit*2)
pendown()
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
"Back to beginning"
penup()
right(90)
forward(unit*3)
left(90)
forward(unit*4)
left(90)
def draw_letter_s(unit):
pass
def draw_letter_t(unit):
pass
penup()
forward(unit*3)
pendown()
# right side of stem section
forward(unit*2)
left(90)
forward(unit*6)
# Arm (top) section
right(90)
forward(unit*2)
left(90)
forward(unit*2)
left(90)
forward(unit*6)
left(90)
forward(unit*2)
left(90)
forward(unit*2)
#left side of stem, moving down to start
right(90)
forward(unit*6)
# Start position
left(90)
def draw_letter_u(unit):
pass