xxxxxxxxxx
93
let x = 250;
let y = 250;
let b = 250;
let c = 400;
let x1 = 200;
let y1 = 280;
let x2 = 220;
let y2 = 300;
let x3 = 300;
let y3 = 280;
let x4 = 280;
let y4 = 300;
//let x = random(300,400);
function setup() {
createCanvas(500, 500);
angleMode(DEGREES);
}
function draw() {
//Body
fill(255);
arc(250,500,600,400,180,0);
fill(241,199,92);
arc(250,500,500,300,180,0);
//head
fill(128,212,255);
circle(x, y, 400);
// //eye
// push();
// fill(255);
// noStroke();
// ellipse(160,190,100,150);
// ellipse(340,190,100,150);
// pop();
// //eyeball
// push();
// noStroke();
// fill(50);
// ellipse(170,190,90,150);
// ellipse(330,190,90,150);
// fill(255);
// ellipse(140,190,30,80);
// ellipse(360,190,30,80);
// fill(255,0,0);
// // arc(190,200,50,50,300,120);
// pop();
//glasses
fill(0);
triangle(0,30,300,200,100,260);
triangle(500,30,200,200,400,260);
//mouth);
line(x1,y1,x2,y2);
line(x3,y3,x4,y4);
noFill();
arc(b,c,150,100,180,0);
// noFill()
// line(100, 350, 205, 370);
// line(400, 350, 295, 370);
// arc(250,370,90,50,0,180);
}
function mousePressed(){
x = random(230,300);
y = random(230,300);
z = random(0,255);
b = random(250,270);
c = random(400,410);
x1 = random(180,220);
y1 = random(260,300);
x2 = random(200,240);
y2 = random(280,320);
x3 = random(280,320);
y3 = random(260,300);
x4 = random(260,300);
y4 = random(280,320);
circle(x,y, 400);
let bac = random(0,400);
background(237,219,bac);
arc(b,c,150,100,180,0);
line(x1,y1,x2,y2);
line(x3,y3,x4,y4);
}