void setup(){
size(1200,600);
frameRate(10);
}
void draw(){
background(0);
drawBoo(width/2+100,height/2,random(0,3),random(60,255));
drawBoo(width/2+200,height/2,random(0,3),random(60,255));
drawBoo(width/2+400,height/2,random(0,3),random(60,255));
drawBoo(width/2-100,height/2,random(0,3),random(60,255));
drawBoo(width/2-200,height/2,random(0,3),random(60,255));
drawBoo(width/2-400,height/2,random(0,3),random(60,255));
drawBoo(width/2-800,height/2,random(0,3),random(60,255));
}
void drawBoo(float x, float y, float s, float g) {
pushMatrix();
translate(x,y);
scale(s);
strokeWeight(80);
stroke(g,g+20,g-20);
line(0,-25,0,-60);
noStroke();
fill(255);
ellipse(-17.5,-65,35,35);
ellipse(17.5,-65,35,35);
arc(0,-65,70,70,0,PI);
fill(0);
ellipse(-14,-65,8,8);
ellipse(14,-65,8,8);
quad(0,-58,4,-51,0,-44,-4,-51);
popMatrix();
}
'Programing > Processing' 카테고리의 다른 글
| 나무그리기 -벚꽃버전- (0) | 2017.06.12 |
|---|---|
| Processing Growing Tree (0) | 2017.06.05 |
| map의 사용법 (0) | 2017.05.15 |
| Processing 폰트 불러오기와 글자의 회전 (0) | 2017.05.08 |
| processing 이동 회전 확장( 크기 ) 에 대하여 (0) | 2017.05.08 |