# Jonathan Liang – Project 4 – String Art

``````//Jonathan Liang
//jliang2
//section A

function setup() {
createCanvas(400, 300);

}

function draw() {

//background
background(200);
for (var i = 1; i < 2400; i += 20) {
strokeWeight(4);
stroke('white');
line((i * .25), 0, (i * .25), 300);
}

//right eyebrow
for (var i = 1; i < 65; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(0, -15);
line((i) + 250, 60 - i / 4, (i * 1.1) + 250, 50 - i / 4);
pop();
}

for (var i = 1; i < 45; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(15, -19);
line((i) + 300, 38 + i / 1.5, (i * 1.25) + 300, 45 + i / 1.4);
pop();
}

//right eyelid
for (var i = 1; i < 50; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(90, 50);
scale(.7, .3);
line((i) + 250, 60 - i / 4, (i * 1.1) + 250, 50 - i / 4);
pop();
}

for (var i = 1; i < 50; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(90, 50);
scale(.7, .3);
line((i) + 300, 38 + i / 2, (i * 1.25) + 300, 45 + i / 2);
pop();
}

//left eyebrow
for (var i = 1; i < 45; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(5, 0);
line((i) + 50, 55 - i / 1.5, (i * 1.15) + 50, 54.5 - i / 1.75);
pop();
}

for (var i = 1; i < 65; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(0, -15);
line((i) + 100, 45 + i / 4, (i * 1.05) + 100, 35 + i / 4);
pop();
}

//left eyelid
for (var i = 1; i < 40; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(10, 65);
scale(.85, .3);
line((i) + 50, 55 - i * 1.5, (i * 1.35) + 50, 53 - i * 1.5);
pop();
}

for (var i = 1; i < 65; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(10, 50);
scale(.85, .3);
line((i) + 100, 45 + i / 4, (i * 1.05) + 100, 35 + i / 4);
pop();
}

for (var i = 1; i < 40; i += 1) {
line(i  * 1.1+ 115, 30, 1.5*i + 115, 60 + i/1.1);
}

//right eye
for (var i = 1; i < 35; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(50, 60);
scale(.8, .65);
line((i) + 250, 60 - i / 4, (i) + 250, 50 - i / 4);
pop();
}

for (var i = 1; i < 75; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(35, 79);
scale(.8,);
line((i * 1.25) + 300, (i + 30) / 3, (i) + 300, (i + 38) / 2.5);
pop();
}

for (var i = 1; i < 35; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(50, 60);
scale(.8, .65);
line((i) + 250, 60 - i / 4, (i) + 250, 50 - i / 4);
pop();
}

for (var i = 1; i < 20; i += 1) {
push();
translate(310, -25);
line(1.5*i, 135, .25*i, 150);
pop();
}

//right eyeball
for (var i = 1; i < 50; i += 1.05) {
strokeWeight(1);
stroke('black');
line(i + 280, i * .25 + 95, i + 280, 110);
}

for (var i = 1; i < 25; i += 1) {
strokeWeight(1);
stroke('white');
push();
translate(138, 60);
scale(.5, .5);
line(i + 280, i * .25 + 95, i + 280, 110);
pop();
}

strokeWeight(3);
stroke('white');
line(295, 100, 295, 100);

//left eye
for (var i = 1; i < 45; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(20, 67);
scale(.8);
line((i) + 50, 55 - i / 1.25, (i * 1.15) + 50, 54.5 - i / 1.5);
pop();
}

for (var i = 1; i < 65; i += 1) {
strokeWeight(1);
stroke('black');
push();
translate(10, 60);
scale(.8, .65);
line((i) + 100, 40 + i / 3, (i * 1.25) + 100, 34 + i / 3);
pop();
}

//left eyeball
for (var i = 1; i < 50; i += 1.05) {
strokeWeight(1);
stroke('black');
line(i + 80, 115 - i / 4, i + 80, 90);
}

strokeWeight(3);
stroke('white');
line(110, 100, 110, 100);

//mouth
var mouthColor = mouseX / (400 / 225);

for (var i = 1; i < 60; i += 1) {
strokeWeight(1);
stroke(255 - mouthColor, 25, 102);
push();
scale(.5, .5);
translate(400, 350);
line(i, 10, 3*i, 120);
line(3*i, 120, 1.2*i, 240);
pop();

}

for (var i = 1; i < 60; i += 1) {
strokeWeight(1);
stroke(255 - mouthColor, 25, 102);
push();
scale(.5, .5);
translate(405, 601.5);
rotate(PI, 3);
line(i, 10, 3*i, 120);
line(3*i, 120, 1.2*i, 240);
pop();
}

//pimple

strokeWeight(6);
stroke('black');
line(300, 200, 300, 200);

}

``````

My project was heavily influenced by the Michael Kalish and Oyler Wu Collaborative art installation reALIze. reALIze was a pop art portrait of boxing legend Muhammad Ali completely made of of cords and punching bags (so basically a line drawing with varying line thicknesses.) I thought I could apply a similar concept to make a line drawing of Marilyn Monroe. I thought that using the concept of cross hatching and increasing the number of lines could give thickness to an object. Although I deem my portrait to be unsuccessful, it was still a valuable opportunity to learn how to use loops.