xxxxxxxxxx
61
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// Body
fill(255);
stroke(0);
ellipse(200, 200, 150, 200);
// Head
ellipse(250, 150, 100, 100);
// Eyes
fill(0);
ellipse(235, 140, 20, 20);
ellipse(265, 140, 20, 20);
// Nose
fill(0);
triangle(250, 160, 245, 170, 255, 170);
// Whiskers
line(230, 155, 190, 150);
line(230, 160, 190, 160);
line(230, 165, 190, 170);
line(270, 155, 310, 150);
line(270, 160, 310, 160);
line(270, 165, 310, 170);
// Mouth
noFill();
arc(250, 180, 40, 20, 0, PI);
// Ears
fill(255);
stroke(0);
push();
translate(250, 100);
rotate(radians(-30));
triangle(0, 0, -30, 40, -60, 0);
pop();
push();
translate(250, 100);
rotate(radians(30));
triangle(0, 0, 30, 40, 60, 0);
pop();
// Tail
fill(255);
stroke(0);
triangle(135, 200, 100, 300, 150, 300);
// Legs
rect(175, 300, 30, 100);
rect(245, 300, 30, 100);
}