Homework 3 — Infinitely Fast Population

Ethan Hudgins
Data Mining the City
2 min readSep 26, 2018

I think an interesting simulation of the built environment would be a comparison of agents working through a street grid of different sizes and different directional layouts i.e. one-ways vs two ways. There is a bit of confusion about what is efficient for cities: one ways are seen as faster for cars, but more dangerous; two ways are more flexible to origin and destination routes but lower speed. The reality is the block size has a lot to do with efficient traffic flow. Large one way blocks such as NYC’s gridiron (800 x 200 ft) can make getting to somewhere close by take you wildly different directions and double the distance you need to travel. On the other hand, Portland’s 200 x 200 ft one way streets are efficient because the size is small enough to give drivers many route options at a finer scale. A simulation of time and distance traveled with randomly created origins and destinations could help illustrate this topic.

For the Assignment this week, I created a population of 150 people that move instantaneously across terrain. Because the movement is instantaneous, it is difficult to say how fast each person is going. This sort of instantaneous movement through space would likely require large amounts of energy, so this terrain area is likely very hot. The population color coded using fill(random(0,255), random(0,255), random(0,255)). The terrain is made using noise, so it is varied.

x = 100
y = 100
xspeed = 4
yspeed = 2
popSize = 150
noiseValue = 0
noiseScale = 0.05
def setup():
size(800,800)
i = 0
for i in range(popSize):
x = random(0,width)
y = random(0,height)
stroke(0)
ellipse(x,y,10,10)

for y in range(height):
for x in range(width):
noiseValue = noise(x * noiseScale, y * noiseScale)
stroke(noiseValue * 255)
point(x, y)
def draw():
global x, y, xspeed, yspeed

fill(255)
fill(0)
background(255)
for y in range(height):
for x in range(width):
noiseValue = noise(x * noiseScale, y * noiseScale)
stroke(noiseValue * 255)
point(x, y)
# noLoop()
i = 0
for i in range(popSize/2):
x = random(0,width)
y = random(0,height)
noStroke()
fill(random(0,255), random(0,255),random(0,255))
ellipse(x,y,15,15)
frameRate(1)
for i in range(popSize/2):
x = random(0,width)
y = random(0,height)
noStroke()
fill(random(0,255), random(0,255),random(0,255))
ellipse(x,y,15,15)
# cherrio!

--

--