Isabella Hong – Project -01

I aimed to create as realistic a self portrait I could for this project. I was very aware of the limitations I faced, given the fact that this would be the first time I was creating something from scratch using Javascript. The final product is a very cartoon like and basic emulation of myself. Overall, the project really forced me to constantly think about the sequence of code. Otherwise, I would not have been able to overlap the elements the way I wanted to.

 

ijhongproject1

// Isabella Hong
// Section A (Tuesday 9:00AM)
// ijhong@andrew.cmu.edu
// Project-01

function setup() { 
	createCanvas(600, 750);
}

function draw() {
	background(235, 235, 255);
	// Long Length Hair 
	fill(43, 29,14);
	noStroke();
	rect(145, 200, 310, 400);
	// Basic face shape
	fill(229, 194, 152);
	stroke(210, 180, 140);
	ellipse(300, 275, 300, 400);
	// Neck 
	fill(229, 194, 152);
	noStroke();
	rect(250, 350, 100, 200);
	// Torso
	fill(0, 0, 0);
	stroke(255, 255, 255);
	strokeWeight(2.5);
	rect(250, 525, 100, 300);
	// Clothing
	fill(0, 0, 0);
	rect(99, 561.5, 150, 300);
	rect(350, 561.5, 150, 300);
	fill(0, 0, 0); 
	triangle(250, 525, 250, 663, 100, 563);
	triangle(350, 525, 350, 663, 500, 563);
	//Glasses 
	stroke(87, 22, 22); 
	strokeWeight(7);
	line(155, 225, 445, 225);
	noFill();
	rect(175, 225, 110, 80);
	rect(315, 225, 110, 80); 
	// Eyes
	fill(43, 29, 14);
	noStroke();
	ellipse(230, 267, 20, 20);
	ellipse(370, 267, 20, 20);
	// Nose
	fill(229, 194, 152);
	stroke(210, 180, 140);
	strokeWeight(2);
	smooth();
	quad(302, 277, 282, 352, 302, 365, 317, 352);
	//Birthmark
	fill(210, 180, 140);
	stroke(210, 180, 140);
	noSmooth();
	ellipse(400, 320, 20, 15);
	// Mouth
	fill(244, 194, 194);
	stroke(231, 84, 128);
	angleMode(DEGREES);
	arc(300, 385, 110, 110, 0, 180, CHORD);
	// Top Hair 
	fill(43, 29, 14);
	noStroke();
	angleMode(DEGREES);
	arc(300, 210, 320, 300, 180, 360, CHORD);
	noLoop();

}
	


	

Leave a Reply