Jonathan Liang – Project 1 – Face

sketch

/*Jonathan Liang
Section A
jliang2@andrew.cmu.edu
project_01*/



function setup() {
    createCanvas(600, 600);
    background(22, 13, 16);
    text("p5.js vers 0.7.1 test.", 10, 15);
}

function draw() {
	
//face
	fill(253, 240, 81);
	noStroke();
	ellipse(300, 330, 220, 200);

	fill(205, 82, 48);
	noStroke();
	arc(308, 390, 159, 80, 0, HALF_PI);

	fill(205, 82, 48);
	noStroke();
	quad(300, 330, 410, 330, 390, 400, 300, 365);

	fill(205, 82, 48);
	noStroke();
	triangle(300, 360, 310, 400, 389, 400);

	fill(22, 13, 16);
	noStroke();
	triangle(190, 330, 190, 430, 225, 430);

	fill(22, 13, 16);
	noStroke();
	triangle(410, 330, 410, 430, 375, 430);

	fill(205, 82, 48);
	noStroke();
	quad(300, 360, 290, 380, 310, 400, 387, 398);


//eyes
	fill('white');
	noStroke();
	ellipse(250, 330, 50, 40);

	fill('white');
	noStroke();
	ellipse(350, 330, 50, 40);

//shades
	fill(22, 13, 16);
	noStroke();
	arc(250, 330, 68, 60, 0, PI + QUARTER_PI, CHORD);

	fill(22, 13, 16);
	noStroke();
	arc(350, 330, 68, 60, 0, PI + QUARTER_PI, CHORD);

	noFill();
	stroke(22, 13, 16);
	strokeWeight(15);
	curve(250, 325, 283, 330, 317, 330, 350, 325)

//buckethat
	fill(253, 240, 81);
	noStroke();
	quad(180, 180, 420, 170, 440, 330, 160, 330);
	
	fill(253, 240, 81);
	triangle(170, 315, 170, 330, 130, 330);
	noStroke();

	fill(205, 82, 48);
	triangle(430, 320, 430, 330, 450, 330);
	noStroke();

	fill(205, 82, 48);
	noStroke();
	quad(200, 200, 420, 170, 440, 330, 190, 330);

//design
	noFill();
	stroke(253, 240, 81);
	strokeWeight(10);
	ellipse(300, 241, 110, 110);

	fill(253, 240, 81);
	noStroke();
	textSize(75);
	text('梁', 266, 265);


//text
	fill(205, 82, 48);
	noStroke();
	textSize(10);
	text('little man, big hat', 265, 500);
	

}

Leave a Reply