xxxxxxxxxx
51
function setup() {
createCanvas(500, 400);
}
function draw() {
background('rgb(204,149,246)');
//head
ellipse(width/2, height/2, 200, 200);
//left ear
triangle(160, 90, 200, 110, 170, 140);
//right ear
triangle(345, 90, 290, 110, 330, 140);
//left whiskers
line(180, 220, 130, 220);
line(190, 230, 120, 240);
//right whiskers
line(380, 220, 310, 220);
line(300, 230, 360, 240);
push()
fill ('black')
//nose
triangle(235, 200, 245, 220, 260, 200);
//eyes
ellipse(200,155,10,15)
ellipse(280,155,10,15)
pop()
//mouth
push()
stroke(20)
noFill()
//curve(245,220,225,220,265,220,245,235)
arc(220, 220, 50, 50, 0, PI / 1.0);
arc(270, 220, 50, 50, 0, PI / 1.0);
pop()
console.log(mouseX,mouseY)
}