ssharada-project01-selfportrait

shariwa-self-portrait.js

//Shariwa Sharada
//Section A
//ssharada@andrew.cmu.edu
//Assignment-01

function setup() {
    
}

function draw() {

	createCanvas(600, 800);
    background(241, 242, 247);

    fill(100);
    noStroke();
    triangle(0, 0, 0, 700, 400, 0);

    fill(211, 221, 230);
    noStroke();
    triangle(0, 300, 600, 400, 600, 750);

    fill(193, 196, 203);
    noStroke();
    triangle(100, 800, 600, 0, 600, 300);

//nose
	noFill();
	stroke(136, 66, 66);
	strokeWeight(3);
	curve(200, 100, 500, 240, 510, 325, 200, 200);

//face
	fill(227, 201, 203);
	noStroke();
	arc(350, 310, 330, 330, PI/0.8, PI/3.0, CHORD);

//eye big
	fill(205, 162, 164);
	ellipse(450, 210, 110, 40);

//eye medium
	fill(193, 196, 203);
	ellipse(450, 210, 40, 40);

//eye small
	fill(77, 43, 50);
	ellipse(440, 210, 20, 15);

//dimple
	push();
	fill(207, 174, 176);
	noStroke();
	rotate(PI/0.1675);
	translate(-10, 50);
	ellipse(430, 325, 5, 30);
	pop();

//upper lip
	fill(170, 87, 91);
	noStroke();
	triangle(mouseX, mouseY, 530, 370, 520, 340);

//lower lip
	fill(194, 93, 97);
	triangle(mouseX, mouseY, 530, 375, 520, 390);

//rotated and scaled hair
	push()
	scale(0.75, 0.75);
	translate(700, 900);
	rotate(PI*3.0);
	noFill();
	stroke(159, 104, 107);
	strokeWeight(3);
	arc(350, 310, 450, 450, PI, PI/0.6);
	arc(350, 310, 325, 325, PI/1.5, PI/0.625);

	strokeWeight(6);
	arc(350, 310, 400, 400, PI/1.5, PI/0.9);

	strokeWeight(1.75);
	arc(350, 310, 350, 350, PI/1.4, PI/0.595);

	strokeWeight(2);
	arc(350, 310, 175, 175, PI/1.3, PI/0.7);

	strokeWeight(3.5);
	arc(350, 310, 200, 200, PI/1.7, PI/0.85);

	strokeWeight(2.5);
	arc(350, 310, 230, 230, PI/1.9, PI/0.95);

	strokeWeight(4);
	arc(350, 310, 250, 250, PI/1.5, PI/0.7);

	strokeWeight(2);
	arc(350, 310, 275, 275, PI/1.4, PI/0.65);

	stroke(214, 176, 178);
	strokeWeight(2.25);
	arc(350, 310, 375, 375, PI/1.35, PI/0.58);

	strokeWeight(3);
	arc(350, 310, 400, 400, PI/0.8, PI/0.6);

	strokeWeight(1);
	arc(350, 310, 150, 150, PI/1.7, PI/0.8);

	strokeWeight(3.5);
	arc(350, 310, 300, 300, PI/2, PI/0.675);

	strokeWeight(5);
	arc(350, 310, 420, 420, PI/0.9, PI/0.6);

	pop();

//smaller rotated and scaled hair
	push()
	scale(0.55, 0.55);
	translate(150, 875);
	noFill();
	stroke(193, 154, 157);
	strokeWeight(3);
	arc(350, 310, 450, 450, PI, PI/0.6);
	arc(350, 310, 325, 325, PI/1.5, PI/0.625);

	strokeWeight(6);
	arc(350, 310, 400, 400, PI/1.5, PI/0.9);

	strokeWeight(1.75);
	arc(350, 310, 350, 350, PI/1.4, PI/0.595);

	strokeWeight(2);
	arc(350, 310, 175, 175, PI/1.3, PI/0.7);

	strokeWeight(3.5);
	arc(350, 310, 200, 200, PI/1.7, PI/0.85);

	strokeWeight(2.5);
	arc(350, 310, 230, 230, PI/1.9, PI/0.95);

	strokeWeight(4);
	arc(350, 310, 250, 250, PI/1.5, PI/0.7);

	strokeWeight(2);
	arc(350, 310, 275, 275, PI/1.4, PI/0.65);

	stroke(227, 197, 198);
	strokeWeight(2.25);
	arc(350, 310, 375, 375, PI/1.35, PI/0.58);

	strokeWeight(3);
	arc(350, 310, 400, 400, PI/0.8, PI/0.6);

	strokeWeight(1);
	arc(350, 310, 150, 150, PI/1.7, PI/0.8);

	strokeWeight(3.5);
	arc(350, 310, 300, 300, PI/2, PI/0.675);

	strokeWeight(5);
	arc(350, 310, 420, 420, PI/0.9, PI/0.6);

	pop();

//even smaller rotated and scaled hair
	push()
	scale(0.5, 0.5);
	translate(825, 1750);
	rotate(PI*3.0);
	noFill();
	stroke(229, 198, 200);
	strokeWeight(3);
	arc(350, 310, 450, 450, PI, PI/0.6);
	arc(350, 310, 325, 325, PI/1.5, PI/0.625);

	strokeWeight(6);
	arc(350, 310, 400, 400, PI/1.5, PI/0.9);

	strokeWeight(1.75);
	arc(350, 310, 350, 350, PI/1.4, PI/0.595);

	strokeWeight(2);
	arc(350, 310, 175, 175, PI/1.3, PI/0.7);

	strokeWeight(3.5);
	arc(350, 310, 200, 200, PI/1.7, PI/0.85);

	strokeWeight(2.5);
	arc(350, 310, 230, 230, PI/1.9, PI/0.95);

	strokeWeight(4);
	arc(350, 310, 250, 250, PI/1.5, PI/0.7);

	strokeWeight(2);
	arc(350, 310, 275, 275, PI/1.4, PI/0.65);

	stroke(240, 222, 223);
	strokeWeight(2.25);
	arc(350, 310, 375, 375, PI/1.35, PI/0.58);

	strokeWeight(3);
	arc(350, 310, 400, 400, PI/0.8, PI/0.6);

	strokeWeight(1);
	arc(350, 310, 150, 150, PI/1.7, PI/0.8);

	strokeWeight(3.5);
	arc(350, 310, 300, 300, PI/2, PI/0.675);

	strokeWeight(5);
	arc(350, 310, 420, 420, PI/0.9, PI/0.6);

	pop();

//ear outside 
	fill(244, 225, 220);
	ellipse(310, 325, 30, 130);

//ear3
	fill(231, 211, 207);
	stroke(193, 196, 203);
	strokeWeight(1);
	arc(310, 325, 25, 90, PI*.4, PI*1.45, CHORD);

//ear2
	fill(214, 192, 186);
	stroke(156, 163, 179);
	strokeWeight(1);
	arc(310, 325, 20, 80, PI/3.0, PI, CHORD);

//hair
	noFill();
	stroke(127, 65, 68);
	strokeWeight(3.5);
	arc(350, 310, 200, 200, PI/1.7, PI/0.85);

	strokeWeight(2.5);
	arc(350, 310, 230, 230, PI/1.9, PI/0.95);

	strokeWeight(4);
	arc(350, 310, 250, 250, PI/1.5, PI/0.7);

	strokeWeight(2);
	arc(350, 310, 275, 275, PI/1.4, PI/0.65);

//earhole2
	fill(231, 204, 197 );
	noStroke();
	ellipse(310, 377, 7.5, 12.5);

//earhole1
	fill(218, 185, 177);
	noStroke();
	ellipse(310, 377, 2.5, 2.5);

//eyebrow1
	fill(137, 131, 131);
	noStroke();
	quad(450, 160, 440, 170, 490, 190, 500, 180)

//eyebrow2
	fill(137, 131, 131);
	noStroke();
	triangle(450, 160, 455, 170, 375, 190)

//hair
	noFill();
	stroke(127, 65, 68);
	strokeWeight(3);
	arc(350, 310, 450, 450, PI, PI/0.6);
	arc(350, 310, 325, 325, PI/1.5, PI/0.625);

	strokeWeight(6);
	arc(350, 310, 400, 400, PI/1.5, PI/0.9);

	strokeWeight(1.75);
	arc(350, 310, 350, 350, PI/1.4, PI/0.595);

	strokeWeight(2);
	arc(350, 310, 175, 175, PI/1.3, PI/0.7);

	stroke(187, 136, 138);
	strokeWeight(2.25);
	arc(350, 310, 375, 375, PI/1.35, PI/0.58);

	strokeWeight(3);
	arc(350, 310, 400, 400, PI/0.8, PI/0.6);

	strokeWeight(1);
	arc(350, 310, 150, 150, PI/1.7, PI/0.8);

	strokeWeight(3.5);
	arc(350, 310, 300, 300, PI/2, PI/0.675);

	strokeWeight(5);
	arc(350, 310, 420, 420, PI/0.9, PI/0.6);

//earring bottom
	fill(189, 138, 50);
	noStroke();
	ellipse(310, 420, 40, 40);

//earring top
	noFill();
	stroke(226, 171, 75);
	strokeWeight(1.5);
	ellipse(310, 390, 25, 25);

//lip mark 
	fill(226, 171, 75);
	ellipse(500, 330, 2.5, 2.5);


}


 

My self-portrait is a side view of my face. I used the arcs to make my hair which is long. I made the mouth interactive as my mouth is one of my most telling features.

Leave a Reply