class splash{ float x; float y; float h; color c; splash(float tmph, color tmpc) { x = random(width); y = random(height); h = tmph; c = tmpc; } void render() { fill (c); noStroke(); for (int i = 0; i < 50; i++) { float xloc = random(-25, 25) + mouseX; float yloc = random(-25, 25) + mouseY; //float w = random(16) + 8; ellipse(xloc, yloc, mouseX/pmouseX-1, mouseY/pmouseY-1); variableEllipse(mouseX, mouseY, pmouseX, pmouseY); } } void variableEllipse(int x, int y, int px, int py) { float speed = abs(x - px) - abs(y - py); ellipse(x, y, speed, speed); } }