Shirley Chen-Project-01-Face

shirleychen-face

// Shirley Chen
// Section B
// junfanc@andrew.cmu.edu
// Project-01


function setup() {
    createCanvas(600, 600);
    background(255, 171, 187);
}

function draw() {
//hair
	fill(82, 54, 36);
	noStroke();
	rect(151, 182, 299, 298);

//face
	fill(240, 206, 183);
	noStroke();
	rect(190, 150, 230, 230, 20, 20, 80, 80);

//bangs
	noStroke();
	fill(82, 54, 36);
	rect(180, 150, 240, 100);
	fill(82, 54, 36);
	arc(300, 200, 300, 300, PI, 0);
	var x1 = 240,
	x2 = 230,
	x3 = 230,
	x4 = 220;
	var y1 = 250,
	y2 = 190,
	y3 = 190,
	y4 = 250;
	fill(240, 206, 183);
	noStroke();
	bezier(x1, y1, x2, y2, x3, y3, x4, y4);
	var x1 = 295,
	x2 = 300,
	x3 = 300,
	x4 = 310;
	var y1 = 250,
	y2 = 197,
	y3 = 197,
	y4 = 250;
	fill(240, 206, 183);
	bezier(x1, y1, x2, y2, x3, y3, x4, y4);
	var x1 = 375,
	x2 = 380,
	x3 = 380,
	x4 = 390;
	var y1 = 250,
	y2 = 220,
	y3 = 220,
	y4 = 250;
	fill(240, 206, 183);
	bezier(x1, y1, x2, y2, x3, y3, x4, y4);

//eyes
	fill(0);
	var c = color(0);
	fill(c);
	ellipse(250, 300, 35, 35);
	ellipse(360, 300, 35, 35);

//blush
	var c = color(249, 177, 177);
	fill(c);
	ellipse(240, 340, 50, 35);
	ellipse(370, 340, 50, 35);

//mouth
	fill(206, 95, 95);
	noStroke();
	rect(290, 345, 30, 20, 0, 0, 10, 10);

//body
	fill(139, 162, 176)
	rect(160, 410, 280, 400, 70, 70, 0, 0);

//neck
	fill(240, 206, 183)
	rect(280, 380, 40, 30);

//hair relection
	noFill();
	stroke(213, 167, 121);
	strokeWeight(9);
	curve(260, 250, 180, 180, 250, 100, 260, 200);
	strokeWeight(15);
	point(180, 200);

//arms	
	stroke(0)
	strokeWeight(2);
	line(200, 500, 200, 600);
	line(400, 500, 400, 600);
}

This project is really fun to work on! The part that I need to be careful about during the process is the order of writing my code because I need to figure out which part is on the top and which is at the bottom. Keeping track with the coordinates is also important during the process. I enjoy this project!

Leave a Reply