Grace Cha – 04 – String Art

sketch

//Grace Cha 
//Section C
//heajinc@andrew.cmu.edu
//PROJECT-04- STRING ART

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

function draw() {
	background(0);
      
	for (var i = 20; i < 480; i += 5) { //start at 20 to 400 by increments of 5

      ////////EACH COLORED 'BRIDGE' IS MADE BY TWO CURVES SHAPES THAT MEET IN THE MIDDLE ///////

      var xx = i * .3; //second x value of LEFT CURVE
      var mirrorImage = width - i; //first x value of RIGHT CURVE
      var mirrorImage1 = width - i * .3; //second x value of RIGHT CURVE
      var curveHeight = 400; //first y value of curve lines
      var curve = HALF_PI * i; //second y value of curve lines 

      var flippedHeight = height - curveHeight; 
      var flippedCurve = height - curve;


      strokeWeight(7);
      stroke(232,244,31,20); //YELLOW TWIST IN CENTER
      line( i + 100, 200, i / 20, PI+QUARTER_PI * i) //LEFT FLAP
      line( mirrorImage, 200, width - i / 20,PI+QUARTER_PI * i); //RIGHT FLAP

      //EACH COLORED 'BRIDGE' IS MADE BY TWO CURVES SHAPES  
      strokeWeight(1);
      stroke(155,31,239,60); //MIDDLE PURPLE
      line(i + 250 ,curveHeight, xx + 250, curve); //LEFT CURVE 
      line(mirrorImage -250, curveHeight, mirrorImage1 - 250, curve); //RIGHT CURVE

      stroke(9,157,150,60); //TEAL
      line(i + 200 , curveHeight, xx + 200, curve);//LEFT CURVE 
      line(mirrorImage - 200, curveHeight, mirrorImage1 - 200, curve);//RIGHT CURVE
      
      stroke(4,74,168,60);//BLUE 
      line(i + 150 ,curveHeight, xx + 150, curve);//LEFT CURVE 
      line(mirrorImage - 150, curveHeight, mirrorImage1 - 150, curve);//RIGHT CURVE

      stroke(199,66,71,96); //CENTERMOST BURGENDY
      line(i + 100 ,curveHeight, xx + 100, curve);//LEFT CURVE 
      line(mirrorImage -100, curveHeight, mirrorImage1 - 100, curve);//RIGHT CURVE
      
      stroke(239,65,54,99); //RED
      line(i + 50, curveHeight, xx + 50, curve);//LEFT CURVE 
      line(mirrorImage -50, curveHeight, mirrorImage1 - 50, curve);//RIGHT CURVE
      
      stroke(155,31,239,80); //FRONT VIOLET
      line(i , curveHeight, xx, curve);//LEFT CURVE 
      line(mirrorImage , curveHeight, mirrorImage1, curve);//RIGHT CURVE

      //////FLIPPPED VERSIONS///// I ONLY CHOSE A FEW TO FLIP  

      strokeWeight(1);
      stroke(155,31,239,60); //MIDDLE PURPLE
      line(i + 250 ,flippedHeight, xx + 250, flippedCurve);//LEFT CURVE 
      line(mirrorImage -250,flippedHeight, mirrorImage1 - 250, flippedCurve);//RIGHT CURVE

      stroke(199,66,71,96); //CENTERMOST BURGENDY
      line(i + 100 ,flippedHeight, xx + 100, flippedCurve);//LEFT CURVE 
      line(mirrorImage -100, flippedHeight, mirrorImage1 - 100, flippedCurve);//RIGHT CURVE
        
      stroke(155,31,239,80); //FRONT VIOLET
      line(i , flippedHeight, xx, flippedCurve);//LEFT CURVE 
      line(mirrorImage , flippedHeight, mirrorImage1, flippedCurve);//RIGHT CURVE
    }
}

My process included with some conditionals I wanted to make for my string art.  I largely played around with overlapping colors and opacity of string colors to indicate dimension.

img_1593
Some Idea Sketches.

Leave a Reply