Jess Medenbach – Face Variables

“A manic day”  

//Jessica Medenbach
//Assignment Project 02;Variables Faces 

var noseCurve2=200;

function setup() {
    createCanvas(640, 480);
}
 
function draw() {
    background(17,216,162);
    fill(189,255,108);
    ellipse(width / 2, height / 2, 250,200);
    beginShape();
//mouth
curveVertex(width/2,  height/2);

curveVertex(281,  291);
curveVertex(268,  290);
curveVertex(221,  200);
curveVertex(232, 300);
curveVertex(232, 300);
endShape();
fill(255);

//eyes
var pupil1=10;
var pupil2=10;
var eyewhite1=30;
var eyewhite2=30;
var pupil1=random(10,30);
var pupil2=random(10,30);
var eyewhite1=random(30,50);
var eyewhite2=random(30,50);


ellipse(width/2,height/2, eyewhite1, eyewhite1);
ellipse(width/3+30,height/3+30, eyewhite2, eyewhite2);
fill(0);
ellipse(width/2,height/2, pupil1, pupil1);
ellipse(width/3+30,height/3+30, pupil2, pupil2);

//hat
fill(0);
 rect(300, 90, 30, 50);
 rect(290, 120, 50, 20);

}

function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.
  
}

Leave a Reply