Project 1: Self Portrait

sketchDownload
//order of layers: bkg > sweater > chest > face > features 
//top to bottom > hair
//bkg: 244, 228, 203
//sweater: 204, 191, 174
//chest: 216, 174, 136
//face: 220, 189, 149
	//eye whites: 235, 219, 215
	//iris & brows: 86, 73, 66
	//lip1: 221, 143, 139
	//lip2: 179, 109, 105


function setup() {
    createCanvas(800, 1000);
    background(244, 228, 203);						//bkg
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
	noStroke();

	fill(204, 191, 174);							//sweater
	rect(650, 600, 150, 200);

	fill(216, 174, 136);							//chest skin
	rect(400, 650, 250, 350);
	arc(650, 875, 50, 250, 0, HALF_PI);

	fill(220, 189, 149);							//face skin
	rect(100, 200, 500, 300);
	arc(400, 675, 250, 100, 0, HALF_PI);
	rect(400, 500, 125, 175);

	fill(63, 60, 73);								//hair 
	arc((425/2), 180, 200, 200, PI, TWO_PI);		//hair positive
	arc(350, 80, 300, 125, 0, TWO_PI);
	arc(500, 250, 250, 350, PI+HALF_PI, TWO_PI);
	arc(125, 400, 250, 450, PI, PI+HALF_PI);
	arc(400, 1000, 250, 550, 0, TWO_PI);
	rect(0, 375, 150, 350);
	rect(0, 725, 400, 275);
	arc(800, 600, 600, 650, 0, PI);
	rect(625, 250, 175, 350);
	rect(150, 450, 100, 200);
	rect(150, 650, 250, 75);
	rect(125, 150, 100, 75);
	arc(125, 225, 100, 300, 0, HALF_PI);
	rect(275, 75, 225, 175);
	rect(500, 250, 125, 150);
	rect(550, 400, 75, 200);
	arc(550, 600, 100, 400, PI, PI+HALF_PI);

	fill(220, 189, 149);							//face skin
	arc(300, 250, 400, 225, PI+HALF_PI, TWO_PI);	//hair negative
	arc(300, 225, 250, 175, 0, PI+HALF_PI);
	arc(400, 375, 550, 700, HALF_PI, PI);
	arc(500, 400, 100, 300, PI+HALF_PI, TWO_PI);
	arc(320, 397, 490, 515, PI+HALF_PI, TWO_PI);
	fill(63, 60, 73);								//hair
	arc(575, 600, 150, 500, PI, PI+HALF_PI);		
	fill(244, 228, 203);							//bkg
	arc(800, 250, 350, 400, HALF_PI, PI);

	fill(86, 73, 66);								//brow
	arc((425/2), (725/2), 75, 100, PI, PI+HALF_PI);	//left brow
	strokeWeight(51/2);
	stroke(86, 73, 66);
	line((425/2), 325, 300, 333);
	noStroke();
	rect(200, 325, 50, 25)
	fill(220, 189, 149);							//face skin
	noStroke();
	rect(250, 325, 75, 25);
	fill(86, 73, 66);								//brow
	arc(250, 325, 120, 40, 0, PI);
	fill(220, 189, 149)								//face skin
	arc((425/2), (725/2), 75, 50, PI, PI+HALF_PI);
	arc((425/2), (725/2), 175, 50, PI+HALF_PI, TWO_PI);

	fill(86, 73, 66)								//brow
	arc(475, 300, 100, 50, PI+HALF_PI, TWO_PI);		//right brow
	strokeWeight(25);
	stroke(86, 73, 66);
	line(400, (625/2), 475, (575/2))
	noStroke();
	fill(220, 189, 149)								//face skin
	arc(500, 302, 50, 15, PI, TWO_PI);
	arc(476, 325, 275, 50, PI, PI+HALF_PI);
	fill(86, 73, 66);								//brow
	arc(431, 300, 90, 20, 0, HALF_PI);
	ellipse(420, 308, 62, 25);
	strokeWeight(10)
	stroke(220, 189, 149)							//face skin
	line(480, 303, 400, 330)
	noStroke();

	fill(216, 174, 136)								//chest skin
	arc(425, 375, 75, 250, HALF_PI, PI);			//nose bridge
	fill(220, 189, 149);							//face skin
	arc(425, 375, 75, 200, HALF_PI, PI);

	fill(216, 174, 136);							//chest skin
	arc(262, 400, 100, 30, PI, TWO_PI);				//left eye
	arc(250, 400, 125, 50, 0, HALF_PI);
	arc(250, 400, 75, 50, HALF_PI, PI);
	fill(235, 219, 215);							//eye white
	strokeWeight(2);
	stroke(63, 60, 73)								//hair
	arc(275, 400, 75, 20, PI+HALF_PI, TWO_PI);
	arc(275, 413, 100, 46, 	PI, PI+HALF_PI);
	noStroke();
	arc(275, 413, 100, 15, HALF_PI, PI);
	arc(275, 400, 75, 41, 0, HALF_PI);
	fill(86, 73, 66);								//iris
	ellipse(275, 406, 30, 30);

	fill(216, 174, 136);							//chest skin
	arc(475, 391, 116, 82, PI, PI+HALF_PI);			//right eye
	arc(475, 375, 75, 50, PI+HALF_PI, TWO_PI);
	arc(475, 375, 75, 32, 0, HALF_PI);
	fill(220, 189, 149);							//face skin
	rect(500, 350, 25, 50);
	fill(235, 219, 215);							//eye white
	strokeWeight(2);
	stroke(63, 60, 73)								//hair
	arc(450, 391, 60, 50, PI, PI+HALF_PI);
	arc(463, 370, 50, 13, PI, TWO_PI);
	noStroke();
	ellipse(443, 381, 25, 25);
	arc(450, 370, 75, 43, 0, HALF_PI);
	fill(220, 189, 149);							//face skin
	arc(440, 397, 75, 15, PI, TWO_PI);
	fill(86, 73, 66);								//iris
	ellipse(450, 378, 25, 25);

	fill(216, 174, 136)								//chest skin
	arc(425, 495, 35, 39, 0, TWO_PI);						//nose
	arc(350, 525, 50, 116, PI, PI+HALF_PI);
	ellipse(350, 525, 50, 32);
	ellipse(375, 525, 63, 16);
	rect(350, 475, 75, 50);
	fill(220, 189, 149);							//face skin
	ellipse(375, 480, 58, 45);
	ellipse(363, 535, 35, 28);
	ellipse(416, 522, 24, 24);

	fill(179, 109, 105)								//lip2
	arc(400, 600, 150, 75,HALF_PI, PI);				//bottom lip
	arc(400, 575, 150, 125, 0, HALF_PI);
	fill(220, 189, 149);							//face skin
	rect(375, 550, 50, 50);
	fill(221, 143, 139);							//lip1
	arc(413, 575, 125, 16, PI+HALF_PI, TWO_PI);		//top lip
	arc(413, 600, 50, 66, PI, PI+HALF_PI);
	arc(326, 575, 300, 66, 0, HALF_PI);
	arc(388, 600, 125, 50, PI, PI+HALF_PI);
	arc(388, 600, 50, 50 , PI+HALF_PI, TWO_PI);
	fill(220, 189, 149);							//face skin
	triangle(325, 610, 375, 575, 325, 575);			//top lip negative
	triangle(475, 580, 475, 567, 410, 567);
	triangle(475, 580, 480, 567, 475, 567);
	triangle(410, 567, 395, 575, 395, 567);

	noLoop();
}

Leave a Reply