int nDots = 200; float speed = 2; int[] dotColor = new int[nDots]; PVector[] allLocs = new PVector[nDots]; PVector[] allVelocs = new PVector[nDots]; int[] sickDur = new int[nDots]; float sz = 5.0; float socialDistance = 0.5; int recoverTime = 1000; int sickColor = 10; int healthColor = 100; int recoverColor = 200; void setup() { size(1280, 720); background(0); strokeWeight(sz); colorMode(HSB, 255, 255, 255); stroke(10, 255, 255); for (int i=0; i recoverTime){ dotColor[i] = recoverColor; } stroke(dotColor[i],255,255); point(location.x, location.y); } for (int i=0; i width) || (location.x < 0)) { velocity.x = velocity.x * -1; } if ((location.y > height) || (location.y < 0)) { velocity.y = velocity.y * -1; } for (int j=0; j