size(300, 300);
}
void draw() {
background(c4);
V3();
}
void V3() {
int x=mouseX;
int y=mouseY;
//FACE
noStroke();
beginShape();
fill(c1,c3,c4);
ellipse(x, y+10, 180, 210);
fill(c1,c2,c3);
ellipse(x-50, y+10, 80, 155);
ellipse(x+50, y+10, 80, 155);
//EYE
fill(c2,c1,c4);
ellipse(x-44, y-4, 85, 65);
ellipse(x+46, y-4, 85, 65);
//Horn
beginShape();
fill(c3,c4,c2);
triangle(x-70, y-25, x-92, y-98, x-14, y-25);
triangle(x+30, y-25, x+98, y-98, x+76, y-25);
}
float c1;
float c2;
float c3;
float c4;
void keyPressed() {
if (key=='q') {
c1=random(0, 255);
c2=random(0, 255);
c3=random(0, 255);
c4=random(0, 255);
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น