xxxxxxxxxx
38
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// draw our cat
cat();
}
function cat() {
push();
translate(width / 2, height / 2);
// ears
triangle(-110, -100, -95, -30, -30, -80)
triangle(110, -100, 95, -30, 30, -80)
// head
circle(0, 0, 200);
// eyes
circle(-40, 0, 40);
circle(40, 0, 40);
// whiskers
for(let i = 0; i < 3; i++) {
line(0, 60, 40, 70 - i * 10)
line(0, 60, -40, 70 - i * 10)
}
// nose
square(-12, 43, 24, 5);
pop();
}