Week 2 : Homework_hl3012
Published in
2 min readSep 18, 2017
Use citibike data to give suggestions to improve bicycle lines
Citibike increases the housing price/air quality/health level.
The citibike is officially opened in 2013, and provides citizens with a new way to travel. Does the siting of Citibike stations influence the neighborhood qualities? About housing price, health level or air quality of neighborhoods.
Processing a Face
#this is where the face is
faceRadius = 90
faceXPosition = 50
faceYPosition = 50
#this is where the eyes are
eyeRadius = 18
eyeYPosition = 42
leftEyeXPosition = 30
rightEyeXPosition = 70
#this is where the eyeballs are
eyeballRadius = 5
eyeballYPosition = 42
lefteyeballXPosition = 30
righteyeballXPosition = 70
#this is where the mouth is
mouthWidth = 15
mouthHeight = 10
mouthX = 43
mouthY = 70
#this is where the cheeks are
cheekRadius1 = 18
cheekRadius2 = 10
cheekYPosition = 63
leftcheekXPosition = 24
rightcheekXPosition = 76
#this is where I draw the shapes of the face
ellipse(faceXPosition, faceYPosition, faceRadius, faceRadius)
ellipse(leftEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
ellipse(rightEyeXPosition, eyeYPosition, eyeRadius, eyeRadius)
rect(mouthX, mouthY, mouthWidth, mouthHeight)
fill(0,0,0)
ellipse(lefteyeballXPosition, eyeballYPosition, eyeballRadius, eyeballRadius)
ellipse(righteyeballXPosition, eyeballYPosition, eyeballRadius, eyeballRadius)
stroke(200,0,0)
fill(200,0,0)
ellipse(leftcheekXPosition, cheekYPosition, cheekRadius1, cheekRadius2)
ellipse(rightcheekXPosition, cheekYPosition, cheekRadius1, cheekRadius2)
#save as image
saveFrame("1.png")
#this is the list of the face
#face=[faceWidth,faceHeight,faceXPosition,faceYPosition]
face=[99,99,0,0]
#this is the list of eyes
#eye=[eyeRadius,eyeYPosition,leftEyeXPosition,rightEyeXPosition]
eye=[25,40,25,75]
#this is the list of eyeballs
#eyeball=[eyeballRadius,eyeballYPosition,lefteyeballXPosition,righteyeballXPosition]
eyeball=[5,42,25,75]
#this is the list of mouth
#mouth=[mouthradius1,mouthradius2,mouthX,mouthY]
mouth=[10,20,50,75]
#this is where the cheeks are
cheekRadius1 = 25
cheekRadius2 = 13
cheekYPosition = 63
leftcheekXPosition = 23
rightcheekXPosition = 77
#this is where I draw the shapes of the face
stroke(0,0,0)
rect(face[2],face[3], face[0], face[0])
ellipse(eye[2], eye[1], eye[0], eye[0])
ellipse(eye[3], eye[1], eye[0], eye[0])
ellipse(mouth[2], mouth[3], mouth[0], mouth[1])
fill(0,0,0)
ellipse(eyeball[2], eyeball[1], eyeball[0], eyeball[0])
ellipse(eyeball[3], eyeball[1], eyeball[0], eyeball[0])
stroke(200,0,0)
fill(200,0,0)
ellipse(leftcheekXPosition, cheekYPosition, cheekRadius1, cheekRadius2)
ellipse(rightcheekXPosition, cheekYPosition, cheekRadius1, cheekRadius2)
saveFrame('2.png')