//import processing.opengl.*; PFont displayFont; //font PImage bg; int fullScreenX = 825;//screen dimensions int fullScreenY = 617; int padding = 150; int numBugs = 250;//number of bugs, people on social group int bugSize = 1; bug[] bugs;//declare array String bugCounter = "bug"; float milliTick = 1200; //stand in for heart rate info void setup() { frameRate(30); size (fullScreenX, fullScreenY); displayFont = loadFont("LucidaGrande-48.vlw"); //font textFont(displayFont, 11); //font bg = loadImage("bg.png"); smooth(); bugs = new bug[numBugs]; for (int i = 0; i < numBugs; i++){//assisgns values to each bug bugs[i] = new bug(round(random(width)), round(random(padding, height - padding)), random(2), random(2), bugSize); if (i%100 == 0){ bugSize++; padding = padding - 20; } } } void draw() { background(10,20, 10); image(bg, 0, 0); for (int i = 0; i < numBugs; i++){ bugs[i].move(); bugs[i].display(); bugs[i].glow(round(random(600, milliTick))); } counter(7, 9); } void counter(int x, int y){ fill(200); rect (x, y, 60, 15); fill(0); if (numBugs == 1){ bugCounter = numBugs + " bug"; } else { bugCounter = numBugs + " bugs"; } text(bugCounter, x + 3, y + 11); }