Project 1 – Self Portrait

sketch
function setup() {
    createCanvas(500, 500);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
	background(230);

	strokeWeight(10);
	stroke(0);
	fill(208, 173, 167);
	rect(0, 0, 250, 250);
	fill(173, 106, 108);
	circle(125, 125, 250);
	fill(106, 123, 118);
	rect(250, 0, 250, 250);
	fill(58, 78, 72);
	circle(375, 125, 250);
	fill(106, 123, 118);
	rect(0, 250, 250, 250);
	fill(58, 78, 72);
	circle(125, 375, 250);
	fill(208, 173, 167);
	rect(250, 250, 250, 250);
	fill(173, 106, 108);
	circle(375, 375, 250);
	//background pattern

	strokeWeight(10);
	noFill();
	stroke(0);
	rect(0, 0, 500, 500);
	//border

	noStroke();
	fill(0);
	rect(117, 112, 266, 240);
	arc(250, 350, 266, 210, 0, PI);
	//face border

	noStroke();
	
	fill(232, 214, 203);
	rect(125, 120, 250, 230);
	fill(232, 214, 203);
	arc(250, 350, 250, 200, 0, PI);
	//face shape

	strokeWeight(8);
	stroke(0);
	fill(173, 160, 151);
	arc(375, 310, 70, 80, radians(270), HALF_PI);
	arc(125, 230, 70, 80, HALF_PI, radians(270));
	//ears

	fill(4, 3, 3);
	arc(193.5, 120, 145, 130, PI, 0);
	arc(338.5, 120, 145, 130, 0, PI);
	//hair

	line(117, 116, 415, 116);
	line(121, 112, 121, 270);
	line(379, 200, 379, 350);
	//hair border, ear border


	strokeWeight(8);
	stroke(0);
	strokeCap(SQUARE);
	line(250, 225, 250, 350);
	//nose line

	noFill();
	arc(200, 225, 100, 70, PI, 0);
	//eyebrows

	line(200, 385, 300, 385);
	//mouth

	strokeWeight(3);
	arc(250, 415, 30, 12, PI, 0);
	arc(195, 385, 10, 15, HALF_PI, radians(270));
	arc(305, 385, 10 ,15, radians(270), HALF_PI);
	//features

	fill(37, 23, 26);
	circle(190, 250, 25);
	triangle(250, 348.5, 215, 348.5, 250, 280);
	//left eye, nose

	noFill();
	strokeWeight(8);
	stroke(0);
	circle(310, 250, 25);
	//right eye








}

Leave a Reply