Each glowing sphere is one person in the cohort. Every person carries a hidden risk score from 0 (healthy) to 1 (severe) that drifts upward each simulated year, driven by three population-level risk factors — poor diet, a sedentary lifestyle and smoking — plus a fixed personal genetic modifier drawn once per person. As the score rises the person's ring moves outward through four concentric zones: Healthy, At-risk, Diagnosed & managed, and Complications.
d(risk)/dt = k · (diet + exercise + smoke) · genetic − adherence_effect
diagnosis: at-risk person is caught by screening at rate = screeningRate
adherence_effect applies only after diagnosis, slows further drift
- Poor diet / sedentary lifestyle / smoking — population-wide prevalence sliders; higher values push every person's risk score upward faster, mirroring how these three factors drive the real leading chronic diseases (type 2 diabetes, cardiovascular disease, COPD).
- Screening rate — the chance per year that an at-risk person gets caught and formally diagnosed. Undiagnosed people keep drifting toward complications with no management at all.
- Medication adherence — once diagnosed, this fraction of the ongoing risk drift is cancelled by treatment and lifestyle management; low adherence lets even a diagnosed person slide into complications.
- Years per second — simulation speed; watch how the same cohort settles into a very different steady-state mix of zones depending on the sliders above.
Real-world relevance: this is why public-health interventions target both ends at once — reducing risk-factor prevalence (diet, exercise, smoking) slows how fast people become at-risk in the first place, while better screening and adherence stop those already at risk from ever reaching irreversible complications.