xxxxxxxxxx
/*Angela Sevilla - Background size: 800x1000 I want to create waves made by many circles of various sizes.
The waves will move as you move your hand closer or further away from the sensor. The closer you are, the bigger they get, and the circles multiply as well.
From far away, I want the color of the circles to almost blend to the background (dark grey with black background, off white with white background, etc.).
As your hand gets closer to the sensor, I want the colors to change into vibrant ones.*/
int endX=0;
int a = 10;
int inc= 6;
float endW = 0;
void setup(){
size(1000,800);
frameRate(5);
endX=0;
}
void draw(){
background(255);
for (int x=0; x<=endX; x+=30){
fill(random(mouseX+mouseY),random(mouseX+mouseY),random(mouseX+mouseY));
stroke(255);
strokeWeight(3);
ellipse(x, 80+sin(a)*40.0,random(2,30),random(2,30));
ellipse(x, 400+sin(a)*40.0,random(2,30)+(mouseX+mouseY)/4,random(2,30)+(mouseY+mouseX)/4);
ellipse(x, 700+sin(a)*40.0,random(2,30),random(2,30));
a=a+inc;
}
endX=endX+30;
if(endX>=height){
endX=endX-10;
}
strokeWeight(1);
stroke(224);
noFill();
for (float w=0.0; w<=endW; w+=3){
ellipse(width/2,height/2,w+(mouseX/2),w+(mouseY/2));
}
endW=endW+3.0;
if (endW>=width){
endW=0;
}
}