xxxxxxxxxx
132
function setup() {
createCanvas(400, 400);
colorMode(RGB);
background(0, 206, 209);
//Activate the three lines below
//to put all in a draw fn
//to get updated X, Y values
//for navigation
// }
// function draw() {
// print(mouseX, mouseY);
//Skin Color
fill(255, 224, 189);
//Ears
noStroke();
//Left
arc(104, 170, 40, 60, PI / 3, 3 * PI / 2);
//Right
arc(296, 170, 40, 60, 3 * PI / 2, PI / 3);
//Face
strokeWeight(0);
ellipse(width / 2, height / 2, 220, 300);
// Eyes
fill(255);
noStroke();
ellipse(width / 2.75, 150, 60, 25);
ellipse(width / 1.6, 150, 60, 25);
// Iris
fill(46, 180, 25);
stroke(46, 180, 25);
ellipse(width / 2.75, 150, 30, 28);
ellipse(width / 1.6, 150, 30, 28);
// Pupils
fill(0)
ellipse(width / 2.75, 150, 15, 15);
ellipse(width / 1.6, 150, 15, 15);
//Crows Feet
//Left out, didn't like
// stroke(150);
// strokeWeight(2);
// //Left
// line(118,150,107,140);
// line(118,150,105,148);
// line(118,150,107,155);
// //Right
// line(283,150,294,140);
// line(283,150,296,148);
// line(283,150,294,155);
//Eye Brows
noFill();
strokeWeight(8);
stroke(90, 43, 11,127);
//Left
bezier(180, 123, 170, 120, 115, 130, 115, 126, );
//Right
bezier(220, 125, 230, 120, 285, 135, 282, 129, );
//Glasses
//Reflections
strokeWeight(1);
stroke(255);
line(274, 160, 254, 185);
line(264, 160, 245, 185);
//Rims
strokeWeight(4);
fill(255, 100);
stroke(127, 127);
ellipse(width / 2.75, 160, 80);
ellipse(width / 1.6, 160, 80);
//Bridge
curve(186, 190, 185, 160, 210, 160, 210, 180);
//Handles
//Left
curve(150, 157, 102, 157, 95, 140, 100, 140);
//Right
curve(350, 157, 290, 157, 303, 143, 300, 100);
//Nose
fill(0, 0);
curve(250, 50, 195, 144, 211, 240, 450, 15);
//Mouth
//Lips Color
stroke(255, 192, 203);
//Lips Width
strokeWeight(5);
//Inner Mouth Color and Shape
fill(255);
arc(width / 2, height / 1.55, 100, 100, 0, HALF_PI + HALF_PI, PIE);
//Teeth
strokeWeight(0.5);
stroke(0);
line(156, 280, 245, 279);
//decided to use a var for y for ease
var y = height / 1.55 + 2;
line(168, y, 168, 292);
line(180, y, 180, 300);
line(192, y, 192, 306);
line(204, y, 204, 306);
line(216, y, 216, 303);
line(228, y, 228, 296);
//Hair
//Main
rectMode(CENTER);
fill(90, 43, 11);
noStroke();
rect(width / 2, 80, 150, 40, 40);
//TOP
rectMode(CORNER);
arc(width / 2, 85, 200, 80, PI, 0);
//BANGS
triangle(173, 96, 185, 99, 175, 120);
triangle(190, 96, 200, 99, 195, 115);
triangle(220, 96, 240, 98, 216, 112);
//SIDEBURNS
arc(120, 110, 60, 90, 2 * PI / 2.75, 5 * PI / 3);
arc(280, 110, 50, 95, -2 * PI / 2.5, -5 * PI / 3);
}