Saturday, August 22, 2009
bobblesketchV6
int dx = 0;
void setup() {
size(300,300);
}
void draw() {
background(20,30,40);
fill(255,255,255);
line(10,10,20,100);
line(10,10,50,50);
line(20,100,50,50);
line(90,10,70,50);
line(90,10,130,50);
line(90,100,70,50);
line(130,50,90,100);
line(150,10,150,100);
line(150,10,180,30);
line(180,30,150,50);
line(150,50,180,100);
line(190,10,190,100);
line(190,50,220,10);
line(190,50,220,100);
if (mousePressed)
{
strokeWeight(10);
stroke(30,mouseY,mouseX);
fill(246,mouseY,mouseX);
}
else
{
strokeWeight(10);
stroke(mouseY,30,mouseX);
fill(10,mouseY,mouseX);
}
if(++dx > 20)
dx = 0;
int w = (mouseX / width) * 200;
int h = (mouseY / height) * 200;
ellipse(150+dx,mouseY+w,mouseX+w ,150+h);
translate(150, 150);
for (int i=0; i < 20 ; i = i+1)
{
translate(h,0);
rotate(PI/10);
rect(mouseX,0,mouseX,mouseY);
}
}
void setup() {
size(300,300);
}
void draw() {
background(20,30,40);
fill(255,255,255);
line(10,10,20,100);
line(10,10,50,50);
line(20,100,50,50);
line(90,10,70,50);
line(90,10,130,50);
line(90,100,70,50);
line(130,50,90,100);
line(150,10,150,100);
line(150,10,180,30);
line(180,30,150,50);
line(150,50,180,100);
line(190,10,190,100);
line(190,50,220,10);
line(190,50,220,100);
if (mousePressed)
{
strokeWeight(10);
stroke(30,mouseY,mouseX);
fill(246,mouseY,mouseX);
}
else
{
strokeWeight(10);
stroke(mouseY,30,mouseX);
fill(10,mouseY,mouseX);
}
if(++dx > 20)
dx = 0;
int w = (mouseX / width) * 200;
int h = (mouseY / height) * 200;
ellipse(150+dx,mouseY+w,mouseX+w ,150+h);
translate(150, 150);
for (int i=0; i < 20 ; i = i+1)
{
translate(h,0);
rotate(PI/10);
rect(mouseX,0,mouseX,mouseY);
}
}