rkondrup-project-04-string-art

sketch

//ryu kondrup
//rkondrup@andrew.cmu.edu
//Section D
//project-04-string-art

var shadow = 5;
var downDown = 30;

function setup() {
    createCanvas(400, 300);
    strokeWeight(1);
    noFill();

}

function draw() {
    background(0);
    for (var i = 20; i < 400; i += 20) {
      //line(i*1.2+120, 0, i/4-50, height);
      //line(i*1.2+120, 0, i/20+200, height+200);
      //line(i/20+200, height+200, 0, 0);

      //red
      stroke(255, 0, 0);
      //big swoop
      bezier(-100, height+1000,
        i*.6, i+10, i*2, i*1.2,
        width-i+100, height-i+100);
        //small swoop
      bezier(0, i*.2+downDown,
             i*.2, i*.3+downDown,
             i*1.7, i*1.6+downDown,
             -100, height+1000+downDown);

        //blue
        stroke(0, 0, 255);
        //big swoop
        bezier(-100+shadow*.4, height+1000,
          i*.6, i+10+shadow*.4, i*2, i*1.2,
          width-i+100+shadow*.4, height-i+100);
          //small swoop
          bezier(0+shadow*.4, i*.2+downDown,
                 i*.2+shadow*.4, i*.3+downDown,
                 i*1.7+shadow*.4, i*1.6+downDown,
                 -100 + shadow*.6, height+1000+downDown);

        //green
        stroke(0, 255, 0)
        //big swoop
        bezier(-100 + shadow*.6, height+1000,
          i*.6 + shadow*.6, i + 10,
          i*2 + shadow*.6, i*1.2,
          width-i + 100 + shadow, height - i + 100);
        //small swoop
        bezier(0 + shadow*.6, i*.2+downDown,
               i*.2 + shadow*.6, i*.3+downDown,
               i*1.7 + shadow*.6, i*1.6+downDown,
               -100 + shadow*.6, height+1000+downDown);



    }

}

In this project, I wanted to create something simple and abstract, but also explore different forms that can be made using curves inside of for loops. I also wanted to experiment with visual effects, so I offset each curve slightly and changed colors to RGB values to give the lines a sense of three-dimensionality and layering.

Leave a Reply