![processing exercise: arc() processing exercise: arc()](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS_3wu7ld-NBUpbaqDpZ7y5GfHNcAzr3Z1JZqbSQFLcOFJ0mlzvpQ6Shy5aBPHcPgeeb7K4vqdsQMID90Hp65OAIzCQkKYIsr5FdwZIPPGHgLTdFpIQ53O7zm2tWySuuvAiNMBSEYN_-s/s1600/ex_Arc.png) |
processing exercise: arc() |
size(400, 300);
smooth();
strokeWeight(3);
//arc(a, b, c, d, start, stop)
arc(50, 50, 100, 100, 0, PI*0.5);
arc(150, 50, 100, 100, 0, HALF_PI);
arc(250, 50, 100, 100, 0, TWO_PI);
arc(350, 50, 100, 100, 0, PI);
//arc(a, b, c, d, start, stop, mode)
noFill();
arc(50, 200, 80, 80, 0, PI+QUARTER_PI, OPEN);
fill(255, 0, 0);
arc(150, 200, 80, 80, 0, radians(300), CLOSE);
fill(0, 255, 0);
arc(250, 200, 80, 80, 0, PI+QUARTER_PI, CHORD);
fill(0, 0, 255);
arc(350, 200, 80, 80, 0, PI+QUARTER_PI, PIE);
No comments:
Post a Comment