sketch-89.js
var head_w1 = 240;var head_w2 = 460;var top_h = 72;var head_h = 60;var jaw_w1 = 260;var jaw_w2 = 410;var jaw_h = 340;var bottom_h = 400;var eye_diam = 25;
var colorR = 140;
var colorG = 30;
var colorB = 230;
var brow_stroke = 6;
var brow_arch = 130;
var lip_stroke = 8;
var bottom_lip_x = width/2
var bottom_lip_y = height/2 + 100
function setup() {
createCanvas(640, 480);
}
function draw() {
background(0);
stroke(255);
strokeWeight(9);
fill(0);
beginShape();
curveVertex(160,180);
curveVertex(160,180);
curveVertex(head_w1,head_h);
curveVertex(width/2,top_h);
curveVertex(head_w2,head_h);
curveVertex(480,180);
curveVertex(480,180);
endShape();
fill(0);
beginShape();
curveVertex(160,180);
curveVertex(160,180);
curveVertex(170,240);
curveVertex(200,280);
curveVertex(jaw_w1,jaw_h);
curveVertex(width/2, bottom_h);
curveVertex(jaw_w2,jaw_h);
curveVertex(420,280)
curveVertex(460,240);
curveVertex(480,180);
curveVertex(480,180);
endShape();
stroke(255);
strokeWeight(12);
fill(colorR,colorG,colorB);
ellipse(250,180,eye_diam);
ellipse(380,180,eye_diam);
stroke(colorR,colorG,colorB);
strokeWeight(brow_stroke);
noFill();
beginShape();
curveVertex(210,160);
curveVertex(210,160);
curveVertex(240,brow_arch);
curveVertex(280,160);
curveVertex(280,160);
endShape();
beginShape();
curveVertex(350,160);
curveVertex(350,160);
curveVertex(390,brow_arch);
curveVertex(430,160);
curveVertex(430,160);
endShape();
stroke(255);
strokeWeight(4);
beginShape();
curveVertex(width/2,height/2 - 25);
curveVertex(width/2,height/2 - 25);
curveVertex(width/2 + 25, height/2+20);
curveVertex(width/2,height/2 + 30);
curveVertex(width/2,height/2 + 30);
endShape();
stroke(colorR,colorG,colorB);
strokeWeight(lip_stroke);
fill(255);
beginShape();
curveVertex(260,height/2 + 60);
curveVertex(260,height/2 + 60);
curveVertex(bottom_lip_x,bottom_lip_y);
curveVertex(350, height/2 + 80);
curveVertex(360, height/2 + 60);
endShape(CLOSE);
}
function mousePressed() {
head_w1 = random(180,240); head_w2 = random(400,460); top_h = random(60,72); head_h = random(top_h,71); jaw_w1 = random(205,260);
jaw_w2 = random(380,415);
bottom_h = random(380,400);
jaw_h = random(285,bottom_h);
eye_diam = random(25,50);
brow_arch = random(115,170);
brow_stroke = random(5,18);
lip_stroke = random(9,22);
bottom_lip_x = random(265,385);
colorR = random(50,230);
colorG = random(30,240);
colorB = random(50,255);
bottom_lip_y = random(height/2+80,height/2+140);
}