kstargio proj2 Download// Katherine Stargiotti, kstargio, B
// PORTRAIT VARIABLES:
//HEAD:
var headWidth = 640/2 - 10;
var headHeight = 840/1.75 - 10;
//SKIN:
var skinTone = 3;
//EYES:
var eyeWidth = 55; //(40, 65)
var eyeHeight = 30; //(15, 35)
var eyeSpread = 12; //(10, 15)
var eyeColor = 1; //(1, 4)
var pupilHeight = 27;
//NOSE:
var noseSpread = 60;
var noseWidth = 10; //(10, 23)
var noseHeight = 60; //(55, 70)
//MOUTH:
var lipColor = 3;
var mouthHeight = 5*840/8
var mouthShape = 1
//HAIR:
var hairColor = 3
var hairStyle = 1
function setup() {
createCanvas(640, 840);
}
function draw() {
background(110, 70, 110); //moved to draw function so faces dont pile up
//SKINTONE:
noStroke();
if (skinTone <= 1) {
fill(240, 211, 202); //lightest
} else if (skinTone <= 2) {
fill(246, 200, 167);
} else if (skinTone <= 3) {
fill(219, 140, 95);
} else if (skinTone <= 4) {
fill(121, 69, 53);
} else {
fill(42, 31, 27); //darkest
}
//HEAD:
ellipse(width/2, height/2, headWidth, headHeight);
//EYES (whites):
fill(255);
stroke(0);
strokeWeight(1);
ellipse(width/2 - 5*eyeSpread, height/2 - 25, eyeWidth, 15);
ellipse(width/2 + 5*eyeSpread, height/2 - 25, eyeWidth, 15);
arc(width/2 - 5*eyeSpread, height/2 - 25, eyeWidth, eyeHeight, PI, 0);
arc(width/2 + 5*eyeSpread, height/2 - 25, eyeWidth, eyeHeight, PI, 0);
//EYES (iris):
noStroke();
fill(0);
if (eyeHeight <= 18) { //conditional statements for IRIS & PUPIL PLACEMENT
pupilHeight = 27;
} else if (eyeHeight <= 22) {
pupilHeight = 28;
} else if (eyeHeight <= 26) {
pupilHeight = 29;
} else if (eyeHeight <= 30) {
pupilHeight = 31;
} else if (eyeHeight <= 33) {
pupilHeight = 32;
} else {
pupilHeight = 33;
}
if (eyeColor <= 1) { //conditional statements for EYECOLOR
fill(64, 106, 138); //blue
} else if (eyeColor <= 2) {
fill(48, 24, 23); //dark brown
} else if (eyeColor <= 3) {
fill(100, 61, 27); //light brown
} else {
fill(105, 85, 25); //green/hazel
} // arcs for iriss
arc(width/2 - 5*eyeSpread, height/2 - pupilHeight, eyeWidth/2, eyeHeight*.8, PI+HALF_PI+QUARTER_PI, PI+(QUARTER_PI), OPEN);
arc(width/2 + 5*eyeSpread, height/2 - pupilHeight, eyeWidth/2, eyeHeight*.8, PI+HALF_PI+QUARTER_PI, PI+QUARTER_PI, OPEN);
//EYES (pupils):
fill(0);
ellipse(width/2 - 5*eyeSpread, height/2 - pupilHeight, eyeWidth/3, eyeHeight*.5);
ellipse(width/2 + 5*eyeSpread, height/2 - pupilHeight, eyeWidth/3, eyeHeight*.5);
fill(255); //glare
ellipse(width/2 - 5*eyeSpread + eyeWidth/12, height/2 - pupilHeight - eyeHeight/12, eyeWidth/8, eyeHeight/6);
ellipse(width/2 + 5*eyeSpread + eyeWidth/12, height/2 - pupilHeight - eyeHeight/12, eyeWidth/8, eyeHeight/6);
ellipse(width/2 - 5*eyeSpread + eyeWidth/9, height/2 - pupilHeight + eyeHeight/12, eyeWidth/16, eyeHeight/11);
ellipse(width/2 + 5*eyeSpread + eyeWidth/9, height/2 - pupilHeight + eyeHeight/12, eyeWidth/16, eyeHeight/11);
//EYES (lashes):
stroke(0);
strokeWeight(3);
noFill();
arc(width/2 - 5*eyeSpread, height/2 - 25, eyeWidth, eyeHeight, PI, 0, OPEN);
arc(width/2 + 5*eyeSpread, height/2 - 25, eyeWidth, eyeHeight, PI, 0);
//NOSE (lines):
noFill();
stroke(0);
strokeWeight(1);
arc(width/2 - noseSpread, height/2 + 15, 95, 175, PI+HALF_PI+QUARTER_PI, QUARTER_PI/2);
arc(width/2 + noseSpread, height/2 + 15, 95, 175, PI-(QUARTER_PI)/2, PI+QUARTER_PI);
//NOSE (bump shadow):
noFill();
strokeWeight(5);
if (skinTone <= 1) {
stroke(230, 201, 192); //lightest skintone
} else if (skinTone <= 2) {
stroke(236, 190, 157);
} else if (skinTone <= 3) {
stroke(209, 130, 85);
} else if (skinTone <= 4) {
stroke(111, 59, 43);
} else {
stroke(32, 21, 17); //darkest skintone
}
arc(width/2, height/2 + 70, noseWidth + 10, 25, PI+QUARTER_PI, -QUARTER_PI), OPEN;
//NOSE (nostrils):
stroke(0);
strokeWeight(1);
beginShape(); // "W" shape for nostrils:
curveVertex(width/2 - (noseWidth+12), height/2 + (noseHeight+7));
curveVertex(width/2 - (noseWidth+12), height/2 + (noseHeight+7));
curveVertex(width/2 - (noseWidth+17), height/2 + (noseHeight+12));
curveVertex(width/2 - (noseWidth+17), height/2 + (noseHeight+20));
curveVertex(width/2 - (noseWidth+10), height/2 + (noseHeight+23));
curveVertex(width/2 - noseWidth, height/2 + 80);
curveVertex(width/2, height/2 + 85);
curveVertex(width/2 + noseWidth, height/2 + 80);
curveVertex(width/2 + (noseWidth+10), height/2 + (noseHeight+23));
curveVertex(width/2 + (noseWidth+17), height/2 + (noseHeight+20));
curveVertex(width/2 + (noseWidth+17), height/2 + (noseHeight+12));
curveVertex(width/2 + (noseWidth+12), height/2 + (noseHeight+7));
curveVertex(width/2 + (noseWidth+12), height/2 + (noseHeight+7));
endShape();
//MOUTH (shape):
if (mouthShape <= 1) {
fill(236, 240, 215);
} else {
if (lipColor <= 1) {
fill(245, 195, 195);
} else if (lipColor <= 2) {
fill(255, 175, 145);
} else if (lipColor <= 3) {
fill(235, 125, 85);
} else if (lipColor <= 4) {
fill(95, 39, 33);
} else {
fill(52, 21, 17);
}}
//MOUTH (closed bottom lip / teeth shape):
beginShape();
curveVertex(width/2 + 65, mouthHeight + 15); //right far (not drawn)
curveVertex(width/2 + 60, mouthHeight + 17); // almost right far
curveVertex(width/2 + 45, mouthHeight + 20);
curveVertex(width/2 + 15, mouthHeight + 20);
curveVertex(width/2, mouthHeight + 22); //mid mid
curveVertex(width/2 - 15, mouthHeight + 20);
curveVertex(width/2 - 45, mouthHeight + 20);
curveVertex(width/2 - 60, mouthHeight + 17); //almost left far
curveVertex(width/2 - 65, mouthHeight + 15); //left far
curveVertex(width/2 - 55, mouthHeight + 23);
curveVertex(width/2 - 40, mouthHeight + 32);
curveVertex(width/2 - 15, mouthHeight + 40);
curveVertex(width/2, mouthHeight + 39); //mid bottom
curveVertex(width/2 + 15, mouthHeight + 40);
curveVertex(width/2 + 40, mouthHeight + 32);
curveVertex(width/2 + 55, mouthHeight + 23);
curveVertex(width/2 + 65, mouthHeight + 15); //right far
curveVertex(width/2 + 60, mouthHeight + 17); // almost right far
curveVertex(width/2 + 45, mouthHeight + 20);
curveVertex(width/2 + 45, mouthHeight + 20);
endShape();
if (mouthShape <= 1) {
line(width/2 - 52, mouthHeight + 18, width/2 - 52, mouthHeight + 27);
line(width/2 - 45, mouthHeight + 18, width/2 - 45, mouthHeight + 28);
line(width/2 - 37, mouthHeight + 18, width/2 - 37, mouthHeight + 30);
line(width/2 - 27, mouthHeight + 18, width/2 - 27, mouthHeight + 32);
line(width/2 - 15, mouthHeight + 18, width/2 - 15, mouthHeight + 34);
line(width/2, mouthHeight + 18, width/2, mouthHeight + 37); //middle line
line(width/2 + 15, mouthHeight + 18, width/2 + 15, mouthHeight + 34);
line(width/2 + 27, mouthHeight + 18, width/2 + 27, mouthHeight + 32);
line(width/2 + 37, mouthHeight + 18, width/2 + 37, mouthHeight + 30);
line(width/2 + 45, mouthHeight + 18, width/2 + 45, mouthHeight + 28);
line(width/2 + 52, mouthHeight + 18, width/2 + 52, mouthHeight + 27);
} else {
null;
}
if (lipColor <= 1) {
fill(245, 195, 195);
} else if (lipColor <= 2) {
fill(255, 175, 145);
} else if (lipColor <= 3) {
fill(235, 125, 85);
} else if (lipColor <= 4) {
fill(95, 39, 33);
} else {
fill(52, 21, 17);
}
//MOUTH (open bottom lip):
if (mouthShape <= 1) {
beginShape();
curveVertex(width/2 + 65, mouthHeight + 16); //right far (not drawn)
curveVertex(width/2 + 60, mouthHeight + 18); // almost right far
curveVertex(width/2 + 45, mouthHeight + 20 + 5);
curveVertex(width/2 + 15, mouthHeight + 20 + 12);
curveVertex(width/2, mouthHeight + 22 + 11); //mid mid
curveVertex(width/2 - 15, mouthHeight + 20 + 12);
curveVertex(width/2 - 45, mouthHeight + 20 + 5);
curveVertex(width/2 - 60, mouthHeight + 18); //almost left far
curveVertex(width/2 - 65, mouthHeight + 16); //left far
curveVertex(width/2 - 55, mouthHeight + 23 + 5);
curveVertex(width/2 - 40, mouthHeight + 32 + 7);
curveVertex(width/2 - 15, mouthHeight + 40 + 10);
curveVertex(width/2, mouthHeight + 39 + 10); //mid bottom
curveVertex(width/2 + 15, mouthHeight + 40 + 10);
curveVertex(width/2 + 40, mouthHeight + 32 + 7);
curveVertex(width/2 + 55, mouthHeight + 23 + 5);
curveVertex(width/2 + 65, mouthHeight + 15); //right far
curveVertex(width/2 + 60, mouthHeight + 17); // almost right far
curveVertex(width/2 + 45, mouthHeight + 20);
curveVertex(width/2 + 45, mouthHeight + 20);
endShape();
} else {
null;
}
//MOUTH (top lip):
beginShape();
curveVertex(width/2 - 65, mouthHeight + 15); //left far (not drawn)
curveVertex(width/2 - 11, mouthHeight + 5);
curveVertex(width/2, mouthHeight + 7); //mid top
curveVertex(width/2 + 11, mouthHeight + 5);
curveVertex(width/2 + 63, mouthHeight + 14); //right far
curveVertex(width/2 + 60, mouthHeight + 17);
curveVertex(width/2 + 45, mouthHeight + 20);
curveVertex(width/2 + 15, mouthHeight + 20);
curveVertex(width/2, mouthHeight + 22); //mid bottom
curveVertex(width/2 - 15, mouthHeight + 20);
curveVertex(width/2 - 45, mouthHeight + 20);
curveVertex(width/2 - 60, mouthHeight + 17);
curveVertex(width/2 - 63, mouthHeight + 14); //left far
curveVertex(width/2 - 11, mouthHeight + 5);
curveVertex(width/2 - 11, mouthHeight + 5); //left mid top (drawn)
endShape();
//HAIR (color):
if (hairColor <= 1) {
stroke(0);
fill(0);
} else if (hairColor <= 2) {
stroke(127);
fill(127);
} else if (hairColor <= 3) {
stroke(23, 9, 7);
fill(23, 9, 7);
} else if (hairColor <= 4) {
stroke(93, 58, 42);
fill(93, 58, 42);
} else if (hairColor <= 5) {
stroke(83, 30, 12);
fill(83, 30, 12);
} else if (hairColor <= 6) {
stroke(226, 174, 126);
fill(226, 174, 126);
} else {
stroke(51, 9, 4);
fill(51, 9, 4);
}
//EYEBROWS:
//left brow:
quad(width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/7 - 4,
width/2 - headWidth/9, height/2 - headHeight/7,
width/2 - headWidth/9 +3, height/2 - headHeight/8,
width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/8 - 5);
beginShape();
curveVertex(width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/7 - 4);
curveVertex(width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/7 - 4);
curveVertex(width/2 - headWidth/4 - eyeSpread/2 - 10, height/2 - headHeight/7 - 4);
curveVertex(width/2 - headWidth/4 - eyeSpread/2 - 20, height/2 - headHeight/7);
curveVertex( width/2 - headWidth/4 - eyeSpread/2 - 30, height/2 - headHeight/8 + 4);
curveVertex( width/2 - headWidth/4 - eyeSpread/2 - 20, height/2 - headHeight/8 - 2);
curveVertex( width/2 - headWidth/4 - eyeSpread/2 - 10, height/2 - headHeight/8 - 5);
curveVertex( width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/8 - 5);
curveVertex( width/2 - headWidth/4 - eyeSpread/2, height/2 - headHeight/8 - 5);
endShape();
//right brow:
quad(width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/7 - 4,
width/2 + headWidth/9, height/2 - headHeight/7,
width/2 + headWidth/9 - 3, height/2 - headHeight/8,
width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/8 - 5);
beginShape();
curveVertex(width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/7 - 4);
curveVertex(width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/7 - 4);
curveVertex(width/2 + headWidth/4 + eyeSpread/2 + 10, height/2 - headHeight/7 - 4);
curveVertex(width/2 + headWidth/4 + eyeSpread/2 + 20, height/2 - headHeight/7);
curveVertex( width/2 + headWidth/4 + eyeSpread/2 + 30, height/2 - headHeight/8 + 4);
curveVertex( width/2 + headWidth/4 + eyeSpread/2 + 20, height/2 - headHeight/8 - 2);
curveVertex( width/2 + headWidth/4 + eyeSpread/2 + 10, height/2 - headHeight/8 - 5);
curveVertex( width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/8 - 5);
curveVertex( width/2 + headWidth/4 + eyeSpread/2, height/2 - headHeight/8 - 5);
endShape();
//HAIR (style):
if (hairStyle <= 1) {
//HAIRSTYLE 1:
//left pony:
beginShape();
curveVertex(width/2 - headWidth/4.5, height/2 - headHeight/3);
curveVertex(width/2 - headWidth/4.5, height/2 - headHeight/2.25);
curveVertex(width/2 - headWidth/3.5, height/2 - headHeight/2);
curveVertex(width/2 - headWidth/2.5, height/2 - headHeight/2);
curveVertex(width/2 - headWidth/2, height/2 - headHeight/2.15);
curveVertex(width/2 - headWidth/1.85, height/2 - headHeight/2.5);
curveVertex(width/2 - headWidth/1.9, height/2 - headHeight/3);
curveVertex(width/2 - headWidth/1.85, height/2 - headHeight/3.75);
curveVertex(width/2 - headWidth/1.9, height/2 - headHeight/4.5);
curveVertex(width/2 - headWidth/1.85, height/2 - headHeight/5.5);
curveVertex(width/2 - headWidth/1.9, height/2 - headHeight/7);
curveVertex(width/2 - headWidth/1.85, height/2 - headHeight/10);
curveVertex(width/2 - headWidth/1.9, height/2 - headHeight/16);
curveVertex(width/2 - headWidth/1.85, height/2 - headHeight/50);
curveVertex(width/2 - headWidth/1.9, height/2 + headHeight/50);
curveVertex(width/2 - headWidth/1.85, height/2 + headHeight/16);
curveVertex(width/2 - headWidth/1.9, height/2 + headHeight/10);
curveVertex(width/2 - headWidth/1.85, height/2 + headHeight/7);
curveVertex(width/2 - headWidth/1.9, height/2 + headHeight/5.5);
curveVertex(width/2 - headWidth/1.85, height/2 + headHeight/4.5);
curveVertex(width/2 - headWidth/1.9, height/2 + headHeight/3.75);
curveVertex(width/2 - headWidth/1.85, height/2 + headHeight/3);
curveVertex(width/2 - headWidth/1.9, height/2 + headHeight/2.5);
curveVertex(width/2 - headWidth/2, height/2 + headHeight/3);
curveVertex(width/2 - headWidth/2.1, height/2 + headHeight/3.75);
curveVertex(width/2 - headWidth/2.07, height/2 + headHeight/4.5);
curveVertex(width/2 - headWidth/2.11, height/2 + headHeight/5.5);
curveVertex(width/2 - headWidth/2.08, height/2 + headHeight/7);
curveVertex(width/2 - headWidth/2, height/2);
curveVertex(width/2 - headWidth/2.2, height/2 - headHeight/5);
curveVertex(width/2 - headWidth/2.6, height/2 - headHeight/3);
curveVertex(width/2 - headWidth/2.7, height/2 - headHeight/2.75);
curveVertex(width/2 - headWidth/2.8, height/2 - headHeight/2.65);
curveVertex(width/2 - headWidth/3, height/2 - headHeight/2.65);
curveVertex(width/2 - headWidth/3, height/2 - headHeight/2.65);
endShape();
//right pony
beginShape();
curveVertex(width/2 + headWidth/4.5, height/2 - headHeight/3);
curveVertex(width/2 + headWidth/4.5, height/2 - headHeight/2.25);
curveVertex(width/2 + headWidth/3.5, height/2 - headHeight/2);
curveVertex(width/2 + headWidth/2.5, height/2 - headHeight/2);
curveVertex(width/2 + headWidth/2, height/2 - headHeight/2.15);
curveVertex(width/2 + headWidth/1.85, height/2 - headHeight/2.5);
curveVertex(width/2 + headWidth/1.9, height/2 - headHeight/3);
curveVertex(width/2 + headWidth/1.85, height/2 - headHeight/3.75);
curveVertex(width/2 + headWidth/1.9, height/2 - headHeight/4.5);
curveVertex(width/2 + headWidth/1.85, height/2 - headHeight/5.5);
curveVertex(width/2 + headWidth/1.9, height/2 - headHeight/7);
curveVertex(width/2 + headWidth/1.85, height/2 - headHeight/10);
curveVertex(width/2 + headWidth/1.9, height/2 - headHeight/16);
curveVertex(width/2 + headWidth/1.85, height/2 - headHeight/50);
curveVertex(width/2 + headWidth/1.9, height/2 + headHeight/50);
curveVertex(width/2 + headWidth/1.85, height/2 + headHeight/16);
curveVertex(width/2 + headWidth/1.9, height/2 + headHeight/10);
curveVertex(width/2 + headWidth/1.85, height/2 + headHeight/7);
curveVertex(width/2 + headWidth/1.9, height/2 + headHeight/5.5);
curveVertex(width/2 + headWidth/1.85, height/2 + headHeight/4.5);
curveVertex(width/2 + headWidth/1.9, height/2 + headHeight/3.75);
curveVertex(width/2 + headWidth/1.85, height/2 + headHeight/3);
curveVertex(width/2 + headWidth/1.9, height/2 + headHeight/2.5);
curveVertex(width/2 + headWidth/2, height/2 + headHeight/3);
curveVertex(width/2 + headWidth/2.1, height/2 + headHeight/3.75);
curveVertex(width/2 + headWidth/2.07, height/2 + headHeight/4.5);
curveVertex(width/2 + headWidth/2.11, height/2 + headHeight/5.5);
curveVertex(width/2 + headWidth/2.08, height/2 + headHeight/7);
curveVertex(width/2 + headWidth/2, height/2);
curveVertex(width/2 + headWidth/2.2, height/2 - headHeight/5);
curveVertex(width/2 + headWidth/2.6, height/2 - headHeight/3);
curveVertex(width/2 + headWidth/2.7, height/2 - headHeight/2.75);
curveVertex(width/2 + headWidth/2.8, height/2 - headHeight/2.65);
curveVertex(width/2 + headWidth/3, height/2 - headHeight/2.65);
curveVertex(width/2 + headWidth/3, height/2 - headHeight/2.65);
endShape();
//hairline:
noFill();
strokeWeight(5);
arc(width/2, height/2, headWidth, headHeight, PI, 0);
strokeWeight(10);
arc(width/2, height/2, headWidth - headWidth/50, headHeight - headHeight/50, PI+QUARTER_PI/4, -QUARTER_PI/4);
strokeWeight(15);
arc(width/2, height/2, headWidth - headWidth/40, headHeight - headHeight/40, PI+QUARTER_PI/2, -QUARTER_PI/2);
strokeWeight(20);
arc(width/2, height/2, headWidth - headWidth/20, headHeight - headHeight/20, PI+QUARTER_PI/2+QUARTER_PI/4, -(QUARTER_PI/2+QUARTER_PI/4));
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/10, headHeight - headHeight/10, PI+QUARTER_PI, -QUARTER_PI);
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/6, headHeight - headHeight/5, PI+QUARTER_PI+QUARTER_PI/4, -(QUARTER_PI+QUARTER_PI/4));
strokeWeight(50);
arc(width/2, height/2 - headHeight/2, headWidth - headWidth/5, headHeight/3, QUARTER_PI, PI - QUARTER_PI);
} else if (hairStyle <= 2) {
//HAIRSTYLE 2:
ellipse(width/2 + 20, height/2 - headHeight/2, headWidth/2, headHeight/3);
noFill();
strokeWeight(5);
arc(width/2, height/2, headWidth, headHeight, PI, 0);
strokeWeight(10);
arc(width/2, height/2, headWidth - headWidth/50, headHeight - headHeight/50, PI+QUARTER_PI/4, -QUARTER_PI/4);
strokeWeight(15);
arc(width/2, height/2, headWidth - headWidth/40, headHeight - headHeight/40, PI+QUARTER_PI/2, -QUARTER_PI/2);
strokeWeight(20);
arc(width/2, height/2, headWidth - headWidth/20, headHeight - headHeight/20, PI+QUARTER_PI/2+QUARTER_PI/4, -(QUARTER_PI/2+QUARTER_PI/4));
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/10, headHeight - headHeight/10, PI+QUARTER_PI, -QUARTER_PI);
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/6, headHeight - headHeight/5, PI+QUARTER_PI+QUARTER_PI/4, -(QUARTER_PI+QUARTER_PI/4));
strokeWeight(50);
arc(width/2, height/2 - headHeight/2, headWidth - headWidth/5, headHeight/3, QUARTER_PI, PI - QUARTER_PI);
} else {
//HAIRSTYLE 3:
noFill();
strokeWeight(5);
arc(width/2, height/2, headWidth, headHeight, PI, 0);
strokeWeight(10);
arc(width/2, height/2, headWidth - headWidth/50, headHeight - headHeight/50, PI+QUARTER_PI/4, -QUARTER_PI/4);
strokeWeight(15);
arc(width/2, height/2, headWidth - headWidth/40, headHeight - headHeight/40, PI+QUARTER_PI/2, -QUARTER_PI/2);
strokeWeight(20);
arc(width/2, height/2, headWidth - headWidth/20, headHeight - headHeight/20, PI+QUARTER_PI/2+QUARTER_PI/4, -(QUARTER_PI/2+QUARTER_PI/4));
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/10, headHeight - headHeight/10, PI+QUARTER_PI, -QUARTER_PI);
strokeWeight(25);
arc(width/2, height/2, headWidth - headWidth/6, headHeight - headHeight/5, PI+QUARTER_PI+QUARTER_PI/4, -(QUARTER_PI+QUARTER_PI/4));
strokeWeight(50);
arc(width/2, height/2 - headHeight/2, headWidth - headWidth/5, headHeight/3, QUARTER_PI, PI - QUARTER_PI);
}
}
function mousePressed() {
//HEAD:
headWidth = random(width/2 - 30, width/2 + 30);
headHeight = random(height/2 - 20, height/2 + 70);
//SKIN:
skinTone = random(0, 5);
//EYES:
eyeWidth = random(40, 65);
eyeHeight = random(15, 37);
eyeSpread = random(10, 15);
eyeColor = random(0, 4);
//NOSE:
noseSpread = random(57, 67);
noseWidth = random(5, 20);
noseHeight = random(55, 65);
//MOUTH:
lipColor = random(0, 5);
mouthHeight = random(5*height/8 - 15, 5*height/8 + 15);
mouthShape = random(2);
//HAIR:
hairColor = random(7);
hairStyle = random(3);
}