Yingying Yan Project-01-Face

Yingying Yan Project-01-Face

/*
    Yingying Yan
    Waitlist
    yingyiny@andrew.cmu.edu
    Project 01 Face
*/

function setup() {
    createCanvas(500, 500);
    background(198,204,201);
}

function draw() {
	//hair or hair tie
	fill(63,60,60);
	rotate(radians(75));
	rect(width/2-128,length/2.5-270,260,51);
	rotate(radians(-75));
	fill(135,163,165);
	ellipse(width/2,height/2.5-123,47,32);
	fill(63,60,60);
	ellipse(width/2,height/2.5-33,185,189);
	

    //ears
    fill(240,208,197);
	ellipse(width/2-90,height/2.5-5,16,25);
	ellipse(width/2+90,height/2.5-5,16,25);

	//body parts
	fill(240,208,197);
	rect(width/2-13,height/2+40,26,18);
	line(237,308,250,330);
	line(237+26,308,250,330);
	line(237,308,250-50,450);
	line(237+26,308,250+50,450)
	
	
	//face
	fill(240,208,197);
	ellipse(width/2,height/2.5,184,187);

	//eyebrows
	arc(width/2-45,height/2.5-25,40,20,PI,0);
	arc(width/2+45,height/2.5-25,40,20,PI,0);


	//mouth
	fill(212,118,118);
	ellipse(width/2,height/2.5+50,40,40);

	//nose
	fill(240,208,197);
	ellipse(width/2,height/2.5+10,11,11);

	//dot
	fill(0);
	ellipse(width/2+70,height/2.5+2,4.5,4.5);

	//eyes
	fill(146,129,115);
	ellipse(width/2-45,height/2.5-8,26,26);
	ellipse(width/2+45,height/2.5-8,26,26);



}

This is my first time coding, so I used as many circles as possible. But it works out because my face always looks surprised. I think I should make another portrait after I finish this class (if I get off the waitlist). It will be fun to compare the before and after.

Leave a Reply