AudreyZheng-Project01-Face

sketch

/*
Audrey Zheng
Section A
audreyz@andrew.cmu.edu
Assignment-01
*/



function setup() {
    createCanvas(468, 584);
}

function draw() {
	background(220);

	//hair
	noStroke();
	fill(0);
	rect(121,108,215,240,100,100,20,20);



	//body
	noStroke();
	fill(200);
	rect(128,340,206,161, 50);

	//neck
	fill(221,169,112);
	rect(206,305,50,69,20);
	fill(250,194,133);
	rect(218,325,38,49,20);

	//ear
	fill(250,194,133);
	ellipseMode(CORNER);
	ellipse(130,220,38,47);
	ellipse(292,220,38,47);


	//earshadows
	fill(231,165,93);
	ellipse(138,228,27,33);
	ellipse(295,227,27,33);


	//face
	fill(250,194,133);
	rect(149,132,162,193,100);

	//bangs
	fill(0);
	//arc(x, y, w, h, start, stop, [mode])
	arc(185, 120, 150, 80, 0, PI + QUARTER_PI + QUARTER_PI, OPEN);
	arc(98, 55, 100, 150, 0, HALF_PI + QUARTER_PI - 0.5,OPEN); //it goes counter clock-wise

	//eyes
	fill(255);
	rect(172,229,31,23,12);
	rect(254,229,31,23,12);
	fill(0);
	ellipse(179,229,18,18);
	ellipse(260,229,18,18);

	//nose
	fill(231,165,93);
	triangle(230, 251, 224, 270, 236, 270);

	//eyebrows
	noFill();
	stroke(90, 60, 50);
	strokeWeight(6);
	arc(170, 230, 40, 10, 3.24, 6, OPEN);
	arc(250, 230, 40, 10, 3.33, 6.1, OPEN);

	//cheeks
	noStroke();
	fill(255,172,172);
	rect(160,270,25,12,7);
	rect(277,270,25,12,7);

	//eyebrows
	stroke(0);

	strokeWeight(12.0);
	strokeCap(ROUND);
	line(171, 206, 201, 201);
	line(264.5,202.5,295.45,207.81);
    
}

//{ } are braces
// [] are brackets.

/* lol you can do this for comment too */

Leave a Reply