프로세싱으로 태극 마크를 그려봤습니다.
애국심이 생겨나네요.
void setup() {
int unit = 150;
// 3:2
size(unit * 3, unit * 2);
noLoop();
smooth();
}
void draw() {
noStroke();
// white
background(255);
// center
translate(width / 2, height / 2);
float t = atan2(height, width);
rotate(t);
scale(0.5);
// north
fill(255, 0, 0);
arc(0, 0, height, height, PI, PI * 2);
// south
fill(0, 0, 255);
arc(0, 0, height, height, 0, PI);
scale(0.5);
pushMatrix();
translate(-height / 2, 0);
fill(255, 0, 0);
ellipse(0, 0, height, height);
popMatrix();
pushMatrix();
translate(height / 2, 0);
fill(0, 0, 255);
ellipse(0, 0, height, height);
popMatrix();
}