steven fei variable face
function setup() {
createCanvas(600, 600);
}
var shirtColor1 = 255
var faceRound = 300;
var hairX = 130;
var noseHeight = 295;
var noseTip = 20;
var mouth1 = 120;
var mouth2 = 30;
var eyebrow1 = 250;
var eyebrow2 = 230;
var eyeHeight = 60;
var eyeballX = 230;
var eyeballY = 290;
function draw() {
background(227,252,207);
noStroke();
fill(shirtColor1,14,14);
rect(100, 450, 400, 140, 100, 100, 0,0);
noStroke();
fill(199,158,95);
triangle(240, 450, 300, 530, 360, 450);
noStroke();
fill(252,226,177);
circle(130, 300, 50);
noStroke();
fill(252, 226,177);
circle(470, 300, 50);
noStroke();
fill(240,210,180);
rect(130,200, 340, 300, 0,0,faceRound, faceRound);
noStroke();
fill(252,226,177);
rect(150,200,300,290,0,0,faceRound, faceRound);
strokeWeight(1);
stroke(20);
fill(135,171,230);
arc(300, 200, 340, 250, PI, TWO_PI, PIE);
strokeWeight(1);
noStroke();
fill(93,129,186);
arc(300, 200, 300, 225, PI, TWO_PI,PIE);
strokeWeight(8);
stroke("black");
fill(240,217,180);
arc(300,210, 200,80, PI, TWO_PI, OPEN);
noStroke();
fill("white");
ellipse(220, 290, 95, eyeHeight);
noStroke();
fill("white");
ellipse(380, 290, 95, eyeHeight);
stroke(100);
strokeWeight(3);
fill("black");
circle(eyeballX, eyeballY, 30);
stroke(100);
strokeWeight(3);
fill("black");
circle(eyeballX + 140, eyeballY, 30);
stroke(50);
strokeWeight(3);
fill(30);
triangle(130,200, 175, 200, hairX, 300);
stroke(50);
strokeWeight(3);
fill(30);
triangle(470,200, 425,200, 600-hairX ,300);
stroke("black");
strokeWeight(5);
noFill();
beginShape();
curveVertex(150, 245);
curveVertex(150,245);
curveVertex(190, eyebrow2);
curveVertex(210, eyebrow2);
curveVertex(240, eyebrow1);
curveVertex(240, eyebrow1);
endShape();
stroke("black");
strokeWeight(5);
noFill();
beginShape();
curveVertex(450, 245);
curveVertex(450,245);
curveVertex(410, eyebrow2);
curveVertex(390, eyebrow2);
curveVertex(360, eyebrow1);
curveVertex(360, eyebrow1);
endShape();
fill(209,173,107);
noStroke();
triangle(300, noseHeight - 8, 280, 350, 320, 350);
fill(237,225,183);
noStroke();
triangle(300, noseHeight, 280, 350, 320, 350);
fill(237,225,183);
stroke(217,187,132);
strokeWeight(1);
arc(300, 350, 40, noseTip, 0, PI, OPEN);
noStroke();
fill(217,108,102);
arc(300, 390, 180, mouth1, 0, PI, PIE);
noStroke();
fill(252,226,177);
arc(300, 390, 180, mouth2, 0, PI, PIE);
}
function mousePressed(){
shirtColor1 = random(10, 255);
faceRound = random(100,300);
hairX = random(120,135);
noseHeight = random(295,315);
noseTip = random(10,25);
mouth1 = random(30,120);
mouth2 = random(1,30);
eyebrow1 = random(220,255);
eyebrow2 = random(200,240);
eyeHeight = random(50,80);
eyeballX = random(210,250);
eyeballY = random(290 - (eyeHeight/2) + 15, 290 + (eyeHeight/2) - 15);
}