Generation Prompt
Page: Virus Propagation - Epidemic Simulation
Slogan: "Visualize how epidemics spread through populations"
Structure:
- Widget before:title -> h1 + p.slogan centered
- Main -> Canvas in .card.full.ratio-16-9 (HD via devicePixelRatio)
- Widget after:algorithm -> SIR model explanation
- Widget modal:claude -> Documentation
Agent States:
- Healthy/Susceptible: Green circles, can be infected
- Infected: Red circles, spread disease on contact
- Recovered: Blue circles, immune to reinfection
- Dead: Gray circles, stationary
Simulation Parameters:
- Population size: Number of agents (50-500)
- Infection radius: Distance for transmission
- Infection rate: Probability per contact (0-100%)
- Recovery time: Frames until recovery (100-500)
- Mortality rate: Chance of death (0-50%)
Controls:
- Start/Pause: Toggle simulation
- Reset: Restart with new population
- Vaccination slider: Initial immune percentage
- Social distancing toggle: Reduce movement speed
Visualization:
- Main canvas: Agent-based 2D simulation
- Chart area: Real-time SIR curves (S=green, I=red, R=blue)
Physics:
- Agents move with random velocity
- Bounce off boundaries
- Collision detection for infection spread