int screenX = 500; int screenY = 500; int maxRunners = 100; ArrayList runners = new ArrayList(); int mousePressX = 0; int mousePressY = 0; class Runner { float x0, y0, x1, y1, x2, y2, x3, y3; int r,g,b; float xstep = 30; float ystep = 30; Runner (float x, float y) { this.x0 = this.x1 = this.x2 = this.x3 = x; this.y0 = this.y1 = this.y2 = this.y3 = y; r = int(random(150,255)); g = int(random(0,25)); b = int(random(0,25)); } void setStep(float x, float y) { this.xstep = x; this.ystep = y; } void setColor(int r, int g, int b) { this.r=r; this.g=g; this.b=b; } void goRun() { x0 = x1; x1 = x2; x2 = x3; x3 = x3 + random(-xstep, xstep); y0 = y1; y1 = y2; y2 = y3; y3 = y3 + random(-ystep, ystep); stroke(r,g,b); curve (x0, y0, x1, y1, x2, y2, x3, y3); } } void setup() { size(screenX,screenY); framerate(30); background(0); for (int i=0; i