Saturday, June 06, 2009
Gradient Circles
// just type here
// and click "submit" when done
int i = 0;
int oldMouseX = 0;
int oldMouseY = 0;
void setup()
{
background(255);
smooth();
size(600,600);
}
void draw()
{
if (oldMouseX == mouseX && oldMouseY == mouseY){
i++;
}
else {
i = 5;
}
noFill();
stroke(100 + i%55 + random(1,100), 100 + i%55 + random(1,100), 100 + i%55 + random(1,100));
translate(mouseX,mouseY);
ellipse(0, 0, i%600, i%600);
oldMouseX = mouseX;
oldMouseY = mouseY;
}
void mousePressed()
{
background(255);
}
// and click "submit" when done
int i = 0;
int oldMouseX = 0;
int oldMouseY = 0;
void setup()
{
background(255);
smooth();
size(600,600);
}
void draw()
{
if (oldMouseX == mouseX && oldMouseY == mouseY){
i++;
}
else {
i = 5;
}
noFill();
stroke(100 + i%55 + random(1,100), 100 + i%55 + random(1,100), 100 + i%55 + random(1,100));
translate(mouseX,mouseY);
ellipse(0, 0, i%600, i%600);
oldMouseX = mouseX;
oldMouseY = mouseY;
}
void mousePressed()
{
background(255);
}
info
submitted by: DARYL_Gammaviews: 1445
yeah baby, now the square moves where your mouse is
This sketch has a parent
comments
loading...
Add a comment: