How Many Flies are in my Apartment?

submited by
Style Pass
2021-06-17 02:30:06

Recently, I was sitting on my fire escape with the window to my apartment slightly open. As there are no screens, I wanted to keep it as closed as possible to keep out any bugs. However, I needed to keep it somewhat open so that I'd be able to get back indoors.

As it was a hot, smelly day in New York City, the flies were abuzz. I found it hard to relax on my illegal balcony knowing that I was basically inviting all of the flies into my apartment for an all-you-can-eat buffet of human detritus.

This got me thinking how effective the partially closed window is at keeping out the flies. What does the function of flies in my apartment over time look like? The perfect question for a Sunday afternoon when you have no friends (unless you count the flies).

In order to run this simulation, we need a model of how a fly navigates its trash-filled world. As a first pass, I'll model a fly as moving in a random direction with a random speed for each timestep of the simulation. Pretty simple, but flies do appear to be relatively simple creatures.

Leave a Comment