Skip to content

Instantly share code, notes, and snippets.

@crazymaster
Created May 8, 2013 11:06
Show Gist options
  • Select an option

  • Save crazymaster/5539780 to your computer and use it in GitHub Desktop.

Select an option

Save crazymaster/5539780 to your computer and use it in GitHub Desktop.
void setup() {
size(360, 150);
smooth();
noLoop();
}
void draw() {
int num = 4;
int rad = 360/num;
int arc_w = 80;
int arc_h = 80;
for (int i = 1;i <= num;i++) {
if (i % 2 == 0) {
arc(60, height/2, arc_w, arc_h, radians(rad * (i-1)), radians(rad * i), OPEN);
arc(180, height/2, arc_w, arc_h, radians(rad * (i-1)), radians(rad * i), CHORD);
arc(300, height/2, arc_w, arc_h, radians(rad * (i-1)), radians(rad * i), PIE);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment