This Processing program simulates a simple bacterial culture in a petri dish. They move in a random walk, eating and reproducing. The system has many adjustable parameters, including the bacteria's maximum speed, initial population, and lifespan.
The interesting thing about this simulator is that, when plotted against time, the population follows a curve that appears in real-world population dynamics. It begins with large amounts of bacteria and a small amount of food. This causes many bacteria to die out. However, in the meantime, more food has "spawned" and the remaining population grows exponentially. After a while, though, these bacteria eat the food faster than it can regenerate, it causes a massive die-out, and the cycle begins again. If this negative feedback loop is perfect, the graph would look like a sine wave. However, thanks to environmental conditions, the population wavers closer and closer to the environment's carrying capacity, which is the largest possible sustainable population.
Here is an in-browser version of the simulation. The agar plate is yellow, the bacteria are green and the food is represented by the black dots. Press any key to toggle between a view of the agar plate and a graph.
The interesting thing about this simulator is that, when plotted against time, the population follows a curve that appears in real-world population dynamics. It begins with large amounts of bacteria and a small amount of food. This causes many bacteria to die out. However, in the meantime, more food has "spawned" and the remaining population grows exponentially. After a while, though, these bacteria eat the food faster than it can regenerate, it causes a massive die-out, and the cycle begins again. If this negative feedback loop is perfect, the graph would look like a sine wave. However, thanks to environmental conditions, the population wavers closer and closer to the environment's carrying capacity, which is the largest possible sustainable population.
Here is an in-browser version of the simulation. The agar plate is yellow, the bacteria are green and the food is represented by the black dots. Press any key to toggle between a view of the agar plate and a graph.
It shows two lines. One is that of the fluctuating bacterial population, and the other is the constant carrying capacity. Eventually, the first line will end up hovering around the second.
bacteria_2.pde | |
File Size: | 3 kb |
File Type: | pde |
The simulator can be downloaded and run with Processing.