Subway Station Goes Crazy!
Published in
5 min readSep 26, 2018
Description
MTA on the northern platform is randomly moving back and forth. People waiting at the platform are shocked and don’t know what to do!
MTA on southern platform just arrived and people are flooding into the train and the station. Revolving door to the station never stops!
How do we accommodate overpopulated station more efficiently?
Rules
- Describing static (shocked) population. People waiting at the northern platform.
- As the train arrives at the station, people are rushing into the station and to the train. To describe this, I used random function to present people filling up spaces in the southern platform and the subway.
- The train on Northern platform is randomly moving back and forth. Also random function was used to describe the randomness.
- Used three different images for population
- people on northern platform are raising their hands in utter shock
- people inside the train are trying to stay skinny as possible to allow space
- people entering the station are running in order to catch the train - Revolving door won’t stop because people are constantly coming into the station. Noise function was used to manipulate the framecount.
def setup():
size(1130, 800)
frameRate(30)
frameCount = 10
global img, img1, img2
img = loadImage("personcheer.png")
img1 = loadImage("personimage.png")
img2 = loadImage("personimage2.png")def draw():
strokeWeight(5)
stroke(80, 80, 80)
x = 5
y = 5
imagezsize = (40, 40)
spacing = 50line(0, 300, 1130, 300)
line(0, 400, 1130, 400)
line(0, 500, 1130, 500)
#People rushing into the station
pushMatrix()
translate(random(0,1320), random(0,600));
image(img1, x-100, y+500, img1.width / 5, img1.height / 5)
popMatrix()
#People filling up the train
pushMatrix()
translate(random(0,1320), 0 );
image(img2, x-50, y+405, img2.width / 2.5, img2.height / 2.3)
popMatrix()
#Train that is randomly moving back and forth
pushMatrix()
translate(random(0, 1500), 0 );
rect(0, 310, 800, 80);
popMatrix()#The not-stop revolving door
pushMatrix()
fill(1,121,181)
stroke(1)
translate(600, 800)
rotate(frameCount*noise(2));
rect(5, 5, 80, 80);
popMatrix()#The train on the southern paltform
noFill()
rect(0, 410, 300, 80)
rect(310, 410, 300, 80)
rect(620, 410, 300, 80)
rect(930, 410, 300, 80)
# Fourth Row Spectators
image(img, x, y, img.width / 2, img.height / 2)
image(img, x+(spacing*1), y, img.width / 2, img.height / 2)
image(img, x+(spacing*2), y, img.width / 2, img.height / 2)
image(img, x+(spacing*3), y, img.width / 2, img.height / 2)
image(img, x+(spacing*4), y, img.width / 2, img.height / 2)
image(img, x+(spacing*5), y, img.width / 2, img.height / 2)
image(img, x+(spacing*6), y, img.width / 2, img.height / 2)
image(img, x+(spacing*7), y, img.width / 2, img.height / 2)
image(img, x+(spacing*8), y, img.width / 2, img.height / 2)
image(img, x+(spacing*9), y, img.width / 2, img.height / 2)
image(img, x+(spacing*10), y, img.width / 2, img.height / 2)
image(img, x+(spacing*11), y, img.width / 2, img.height / 2)
image(img, x+(spacing*12), y, img.width / 2, img.height / 2)
image(img, x+(spacing*13), y, img.width / 2, img.height / 2)
image(img, x+(spacing*14), y, img.width / 2, img.height / 2)
image(img, x+(spacing*15), y, img.width / 2, img.height / 2)
image(img, x+(spacing*16), y, img.width / 2, img.height / 2)
image(img, x+(spacing*17), y, img.width / 2, img.height / 2)
image(img, x+(spacing*18), y, img.width / 2, img.height / 2)
image(img, x+(spacing*19), y, img.width / 2, img.height / 2)
image(img, x+(spacing*20), y, img.width / 2, img.height / 2)# Third Row Spectators
image(img, x+(spacing*0.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*1.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*2.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*3.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*4.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*5.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*6.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*7.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*8.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*9.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*10.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*11.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*12.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*13.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*14.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*15.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*16.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*17.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*18.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*19.5), y+(spacing*1), img.width / 2, img.height / 2)
image(img, x+(spacing*20.5), y+(spacing*1), img.width / 2, img.height / 2)
# Second Row Spectators
image(img, x, y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*1), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*2), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*3), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*4), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*5), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*6), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*7), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*8), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*9), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*10), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*11), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*12), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*13), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*14), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*15), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*16), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*17), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*18), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*19), y+(spacing*2), img.width / 2, img.height / 2)
image(img, x+(spacing*20), y+(spacing*2), img.width / 2, img.height / 2)
# First Row Spectators
image(img, x+(spacing*0.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*1.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*2.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*3.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*4.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*5.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*6.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*7.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*8.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*9.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*10.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*11.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*12.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*13.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*14.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*15.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*16.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*17.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*18.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*19.5), y+(spacing*3), img.width / 2, img.height / 2)
image(img, x+(spacing*20.5), y+(spacing*3), img.width / 2, img.height / 2)