Project-04-String-Art

I wanted to do a silhouette of Disney’s Ariel so I worked from a reference photo to sketch out the original plan.  However, after I was done with the silhouette, I realized she looks more like Aurora.  The overall coding was difficult but after I settled into a rhythm with her profile, it became a little easier.

Original sketch:

img_7424
sketch


//Naomi Shimada
//Section D
//nshimada@andrew.cmu.edu
//Project-04

var y = 100;
var x = 150;
var a = 250;
var b = 225;
var c = 280;
var d = 250;
var e = 325;
var f = 320;
var g = 390;
var j = 400;

function setup() {
	createCanvas(480,640);
 background(0);
}

function draw() {
 
 //right hand corner starting at (480,100)
   
   for (var i = 480; i>380; i = i-3){
    y = y-3;
    stroke(255);
    line(480,y,i,0);
 }

 //starts line of forehead 
 line(380,150,480,150); 

//lower right hair swoop
 while (x>100){
 for (var z = 380; z<480; z = z+3){
    stroke(255);
    line(z,150,480,x);
    x = x-3;
   }
 }

 //lefthairswoop
  for (var i = 0; i<280; i = i+3){
    d = d-3;
    stroke(255);
 line(0,d,i,0);
 }

 //forehead
 for (var i = 380; i<480; i = i+3){
 	 line(i,150,i,225);
 }

//nose
while (b<=230){
for (var i = 380; i<440; i = i+3){
	 line(i,225,i,b)
	 b = b+1;
    }
}

 for (var i = 440; i<480; i = i+3){
      line(i,225,i,304);
  }
 
 while (a<280){
 for (var i = 440; i>400; i = i-3){
 	 line(i,a,i,304);
 	 a = a+2;
    }
 }

 //nose to lip
 while (c<290){
 for (var i = 400; i>390; i = i-3){
 	 line(i,c,i,305);
 	 c = c+2;
    }
 }

 //upper lip
 while (e>=320){
 for (var i = 385; i<400; i = i+3){
	 line(i,f,i,e)
	 e = e-1;
   f = f+1;
    }
 }
 
 //filler background
 for(var i = 400; i<480; i = i+3){
  line(i,305,i,330);
 }

//filler background
 //for(var i = 385; i<400; i = i+3){
  //line(i,390,i,344);
// }

 //filler background
 for(var i = 400; i<480; i = i+3){
  line(i,331,i,390);
 }

 //lower right hair swoop
 while (g>344){
 for (var i = 375; i<400; i = i+3){
    stroke(255);
    line(i,390,400,g);
    g = g-3;
   }
 }

//neck
while(j<600){
 for(var i = 355; i<480; i = i+3){
    line(i,390,i,j);
    j = j + 3;
  }
 }

 //eyelashes
 push();
 stroke(0);
 strokeWeight(5);
 line(380,190,390,185);
 line(390,185,395,180);
 pop();

 push();
 stroke(0);
 strokeWeight(5);
 line(378,190,390,175);
 line(390,175,393,170);
 pop();

 }






 

Leave a Reply