Broken Glass
float mouseDistance;
int counter;
int x= 300;
int y = 200;
void setup () {
size (550,200);
background (255);
}
void draw () {
counter++;
println(counter);
mouseDistance = dist(pmouseX, pmouseY, mouseX, mouseY);
fill(#AAAAAA, 300);
for (int i=100; i<width; i++) {
line(0, i/.5, width, i/.5);
}
translate (width/2, height/2);
rotate(counter);
line(0, 0, mouseX, mouseY);
noStroke ();
if (mousePressed == false) {
pushMatrix ();
translate (mouseX, mouseY/3);
rotate(radians (counter));
fill (#0AFAA4, 50);
ellipse(0, 0, mouseX, 10);
popMatrix ();
fill (#AAAAAA, 200);
translate (mouseX, mouseY);
rotate(radians(counter+2));
ellipse(0, 0, mouseX, 10);
ellipse(0, 0, 10, mouseY);
}
}
void keyPressed () {
save (“drawing3.jpg”);
}