Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦠 Infection Spread Heatmap Simulation

This project simulates the spread of an infectious disease using a proximity-based SIR model and visualizes it as a heatmap. Instead of tracking individual people or graph connections, the simulation focuses on infection density over time from a top-down aerial view, similar to how outbreaks are mapped in real-world epidemiology.

🌍 Concept

  • Uniformly distributed agents across a 2D map.
  • Slight Brownian motion to simulate interaction.
  • Proximity-based infection: agents infect others within 5 meters.
  • Infection probability decreases exponentially with distance.
  • Agents recover after a random time.
  • Recovered agents can be reinfected, but with lower probability.
  • Heatmap shows infection density, not people.

πŸ”§ Features

  • βœ… Brownian motion (minimal movement)
  • βœ… SIR model: Susceptible β†’ Infected β†’ Recovered
  • βœ… Reinfection support
  • βœ… Per-pixel infection heatmap (OpenGL GPU-accelerated)
  • βœ… Custom-sized pixel grid (e.g., 200Γ—150) rendered full-screen
  • βœ… Real-time rendering using PyOpenGL + GLFW
  • βœ… Scalable and optimized with spatial hashing
  • βœ… Configurable menu for parameters

βš™οΈ Menu Options

A configuration menu allows customization of:

  • Number of agents
  • Initial infected count
  • Infection probability
  • Infection radius
  • Reinfection probability
  • Tick speed (FPS)
  • Pixel size (for rendering)

πŸš€ Simulation

The window will show a red heatmap, where:

  • Light red = low infection density
  • Bright red = high infection density

No individual agents are shown β€” only the infection spread as a visual.

πŸ“Œ License

MIT License


This simulation was built for educational and academic use to model how infections spread in a proximity-based population using GPU-accelerated heatmap rendering.

About

COVID-19 infection simulator.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages