My Project 1

This is an example of the project I designed last week.

mirieproject1
//Mirie Kim
//Class Section: A

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

function draw() {
	background(119, 220, 158);

	//hair
	fill(70, 21, 27);
	noStroke();
	ellipse(150,148,176,200);
	rect(62,148,176,140);

	//ears
	noStroke();
	fill(255, 209, 178);
	circle(70,163,25);
	circle(235,163,25);
	fill(243, 190, 176 );
	circle(70,163,12);
	circle(235,163,12);

	//head
	fill(255, 209, 178); 
	noStroke();
	ellipse(150,148,165,175);

	//bangs
	fill(70, 21, 27);
	stroke(70, 21, 27);
	line(63,145,200,75);
	line(170,90,237,145);
	triangle(80,100,145,60,100,70);
	quad(65,145,75,100,150,50,200,75);
	quad(170,90,235,145,220,90,200,70);
	noStroke();
	triangle(130,100,115,132,175,90);

	//eyes
	fill(255);
	stroke(0);
	strokeWeight(3);
	ellipse(115,155,45); 
	ellipse(185,155,45);

	//pupils
	noStroke();
	fill(70, 21, 27);
	ellipse(115,147,26);
	ellipse(185,147,26);
	fill(255);
	ellipse(120,142,10,10);
	ellipse(190,142,10,10);
	fill(0);
	ellipse(115,147,8); 
	ellipse(185,147,8);

	//eyelashes
	stroke(0);
	strokeWeight(2.5);
	line(87,159,92,159);
	line(86,154,92,155);
	line(86,149,92,151);
	line(209,159,214,159);
	line(214,154,208,155);
	line(214,149,208,151);

	//smile
	noStroke();
	fill(245, 127, 141);
	ellipse(150,195,30,50);

	fill(255, 209, 178);
	rect(90,160,130,27);
	
	//nose
	fill(245, 175, 127); 
	triangle(150,155,145,174,155,174); 
	
	//cheeks
	fill(245, 177, 187);
	ellipse(100,177,40,15);
	ellipse(200,177,40,15);
	
	//glasses
	noFill();
	stroke(0);
	strokeWeight(3);
	ellipse(113,150,60,57); 
	ellipse(187,150,60,57);	
	line(217,150,237,145);
	line(83,150, 63,145);
	line(143,157,157,157);



}

Leave a Reply