Wk2 The Face

Wk2 Face drawing!!

Angela Li
Data Mining the City
1 min readSep 22, 2017

--

Now it has the nose.
It is my first time using Python. Hard but also fun.Below is the source code. Hope I’m doing it right.#this is how I drew the eyes
eyeRadius = 25
eyeYPosition = 25
leftEyeXPosition = 30
rightEyeXPosition = 70
eyes = [‘eyeRadius’, 25, ‘eyePosition’, 25, ‘leftEyePosition’, 30, ‘rightEyePosition’, 70]
ellipse(eyes[5], eyes[3], eyes[1], eyes[1])
ellipse(eyes[-1], eyes[3], eyes[1], eyes[1])
#this is how I drew the nose
noseHeight1 = 50
noseHeight2 = 40
noseWidth1 = 45
nosewidth2 = 55
noseWidth3 = 55
noseWidth4 = 55
nose = [‘noseHeight1’, 50, ‘noseHeight2’, 40, ‘noseWidth1’, 45, ‘noseWidth2’, 55, ‘noseWidth3’, 55, ‘noseWidth4’, 55]
triangle(nose[1], nose[3], nose[5], nose[7], nose[9], nose[11])
#this is how I drew the mouth
mouthX1 = 30
mouthY1 = 90
mouthX2 = 70
mouthY2 = 90
mouth = [‘mouthX1’, 30, ‘mouthY1’, 90, ‘mouthX2’, 70, ‘mouthY2’, 90]
strokeWeight(5)
line(mouth[1], mouth[3], mouth[5], mouth[7])
#this is how I get everything
ellipse(eyes[5], eyes[3], eyes[1], eyes[1])
ellipse(eyes[-1], eyes[3], eyes[1], eyes[1])
triangle(nose[1], nose[3], nose[5], nose[7], nose[9], nose[11])
strokeWeight(5)
line(mouth[1], mouth[3], mouth[5], mouth[7])
I’ll try to be more creative next time!

--

--