//Sharon Lee
//Section E
//dayoungl@andrew.cmu.edu
//Project-02
var eyeDepth = 100;
var eyeLevel = 175;
var faceWidth = 250;
var faceHeight = 330;
var earWidth = 20;
var earLength = 120;
function setup() {
createCanvas(400, 600);
angleMode(DEGREES);
}
//create a face of a Moai sculpture
function draw() {
background(170,195,227);
//ears
fill(121,117,130);
noStroke();
rect(60,eyeLevel+20,earWidth,earLength);
rect(320,eyeLevel+20,earWidth,earLength);
//face shape
fill(74,72,77);
noStroke();
rect(75,75, faceWidth,faceHeight);
arc(width/2,75,faceWidth,60,180,0);
arc(width/2,400,faceWidth,80,0,180);
//eyehole
fill(32,31,39);
arc(width/2,eyeLevel,faceWidth,eyeDepth,180,0);
//nose
fill(121,117,130);
arc(width/2,eyeLevel,60,45,180,0);
quad(170,eyeLevel,230,eyeLevel,240,300,160,300);
var noseTip = 300;
var noseWidth = 80;
fill(59,57,62);
noStroke();
arc(width/2,noseTip,noseWidth,noseWidth-45,0,180);
}
function mousePressed() {
earLength = random(100,150);
eyeLevel = random(150,185);
eyeDepth = random(70,140);
}
Moai Fam