/*
Circle Drawings
Made with "arc"
Glenn Zucman, Wednesday, 25 June 2008
*/
/* arc(1, 2, 3, 4, 5, 6)
remember, UL corner is origin - 0,0
1 = x center of arc (circle)
2 = y center
3 = width of circle
4 = height of circle
5 = start of circle (radians)
6 = end of circle (radians)
remember 2*PI radians is a full circle
circles start at 3 o'clock and proceed clockwise
*/
/**
* To start: click in the image window and press an arrow key.
* Arrow keys will change the shape/size of the circles
* Enter/Return will clear the screen
*
* Created 25 June 2008
*/
void setup(){
size(800,600);
background(255);
strokeWeight(4);
smooth();
}
int tall=200;
int wide=200;
/*
void draw(){}
void keyPressed(){
println(key);
println(keyCode);
}
*/
//Arrow Key Press Detection
void draw(){}
void keyPressed(){
if (keyCode == 48){strokeWeight(0); }
else if (keyCode == 49){strokeWeight(1); }
else if (keyCode == 50){strokeWeight(2); }
else if (keyCode == 51){strokeWeight(3); }
else if (keyCode == 52){strokeWeight(4); }
else if (keyCode == 53){strokeWeight(5); }
else if (keyCode == 54){strokeWeight(6); }
else if (keyCode == 55){strokeWeight(7); }
else if (keyCode == 56){strokeWeight(8); }
else if (keyCode == 57){strokeWeight(9); }
else if ((keyCode == ENTER) || (keyCode == RETURN)){
background(255);
}
else if (keyCode == UP) {
tall+=10;
}
else if (keyCode == DOWN){
tall-=10;
}
else if (keyCode == LEFT){
wide-=10;
}
else if (keyCode == RIGHT){
wide+=10;
}
arc(200, 300, wide, tall, 0, radians(360));
arc(600, 300, wide, tall, 0, radians(360));
arc(400, 300, wide, tall, 0, radians(360));
//Close Arrow Key Press Detection
}