//Manuel Rodriguez
//Section B, 10:30am
//manuelr@andrew.cmu.edu
//project-02
var fatFace = 1;
var lankyFace = 1;
var reyeLength = 10;
var leyeLength = 20;
var openM = 40;
var narrowM = 3;
var posX = 1;
var posY = 1;
var c1=230;
var c2 = 100;
var c3 = 200;
function setup() {
createCanvas(640, 480);
background(250);
}
function draw() {
//face shadow
fill(c1,c2,c3);
noStroke();
//strokeWeight(2);
beginShape();
curveVertex(125,125*lankyFace);
curveVertex(123,123);
curveVertex(80*fatFace,height/2+10);
curveVertex(90,height-110);
curveVertex(150,height-140);
curveVertex(190*fatFace,height/2+10);
curveVertex(120,120);
curveVertex(125,125);
endShape();
//shape face
noFill();
stroke(0);
strokeWeight(1);
beginShape();
curveVertex(120,120*lankyFace);
curveVertex(120,120*lankyFace);
curveVertex(110*fatFace,height/2);
curveVertex(130,height-100);
curveVertex(140,height-150);
curveVertex(155*fatFace,height/2);
curveVertex(120,120);
curveVertex(120,120*lankyFace);
endShape();
//shape face 2
noFill();
stroke(100);
strokeWeight(1);
beginShape();
curveVertex(125,125*lankyFace);
curveVertex(123,123);
curveVertex(105*fatFace,height/2+10);
curveVertex(135,height-110);
curveVertex(138,height-140);
curveVertex(155*fatFace,height/2+10);
curveVertex(125,125*lankyFace);
curveVertex(125,125);
endShape
//stroke3
noFill();
stroke(220);
strokeWeight(3);
beginShape();
curveVertex(100,100);
curveVertex(130,130);
curveVertex(105,height/2+40);
curveVertex(165,height-100);
curveVertex(178,height-120);
curveVertex(155,height/2+9);
curveVertex(140,125);
curveVertex(125,115);
endShape();
//eyes
noFill();
//lefteye
stroke(0);
strokeWeight(1);
ellipse(120*posX,height/2*posY,5,leyeLength);
//rightteye
stroke(0);
strokeWeight(1);
ellipse(135*posX,height/2*posY,5,reyeLength);
//eyebags
stroke(0);
strokeWeight(1);
line(110*posX,((height/2)+20)*posY, 115*posX, ((height/2)+20)*posY);
line(135*posX,((height/2)+10)*posY, 145*posX, ((height/2)+10)*posY);
//mouth
stroke(0);
strokeWeight(1);
ellipse(127*posX,height/2*posY+70,narrowM,openM);
}
function mousePressed(){
fatFace = random(-1.2,1.5);
lankyFace = random(-1.2,1.8);
c1=random(100,250);
reyeLength = random(0,100);
leyeLength = random(0,60);
openM = random(0,40);
narrowM = random(0,20);
posX = random(1.0,1.01);
posY = random(1.0,1.01);
c2 = random(100,200);
c3 = random(100,200);
clear();
}
I wanted to create a different type of face, some sort of simple – abstract art that reminds of a face but don’t respond to any proportions nor reality. Just departing from “hand-drawing” style, I started drawing different line shapes and then added the colour independent from the outlines. Each outline has its own independency and they do not relate to other face features such as eyes, mouth or eye-bags.