float colVar_r = 120; float colVar_g; float colVar_b = 120; float colVar_a; float r; float x; float y; void setup(){ size(400, 300); background(209); smooth(); } void draw(){ //set vars to ran values // colVar_r = random(255); colVar_g = random(255); //colVar_b = random(255); colVar_a = random(255); r = random(10); x = random(width); y = random(height); if(mouseX > width/2){ colVar_r = colVar_r + 1; }else{ colVar_r = colVar_r - 1; } if(mouseY > height/2){ colVar_b = colVar_b + 1; }else{ colVar_b = colVar_b - 1; } colVar_r = constrain(colVar_r,0, 255); colVar_b = constrain(colVar_b,0, 255); //draw circles noStroke(); fill(colVar_r,colVar_g,colVar_b,colVar_a); ellipse(x,y,2*r,2*r); stroke(200); line(width/2,0,width/2,height); line(0,height/2,width,height/2); }