Jamie Dorst Project 01 Face


/*
Jamie Dorst
Section A
jdorst@andrew.cmu
Project-01
*/

function setup() {
    createCanvas(600, 600);
    background('#ADD8E6');
}

function draw() {

	noStroke();
	translate(-10, -30);
	
// hair
	fill('#271815');
	rectMode(CENTER);
	rect(300, 320, 250, 320, 100, 100, 20, 20);
	
// face
	fill('#EAC086');
	rectMode(CENTER);
	rect(300, 310, 200, 240, 100, 100, 120, 120);

// eyes
	fill('white');
	ellipseMode(CENTER);
	ellipse(255, 290, 40, 20);
	ellipse(345, 290, 40, 20);

	fill('#49311C');
	ellipse(255, 290, 20, 20);
	ellipse(345, 290, 20, 20);

	fill('black');
	ellipse(255, 290, 12, 12);
	ellipse(345, 290, 12, 12);

// eyebrows
	fill('#2D221F');
	rect(250, 270, 50, 7);

	rect(350, 270, 50, 7)

// nose
	noFill();
	stroke(51);
	strokeWeight(2);
	arc(300, 335, 22, 20, 0, PI);

// mouth
	strokeWeight(4);
	strokeCap(ROUND);
	stroke('#C4877A');
	arc(300, 370, 50, 25, 0, PI);

// more hair
	noStroke();
	fill('#271815');

	translate(250, -120);
	rotate(PI / 4.0);
	ellipseMode(CENTER);
	ellipse(250, 250, 70, 180);

	translate(576, -80);
	rotate(PI / 2.0);
	ellipseMode(CENTER);
	ellipse(250, 250, 70, 160);

}

I found this project sort of difficult at first just to visualize what I was going to be doing and the order the layers needed to be in, but once I got going I got the hang of it. The most difficult part was probably rotating the ellipses for my hair, I figured out a way to do it eventually, but I’m guessing there’s a better way than what I did.

Leave a Reply