nahyunk1-Project04-String Art

sketch

function setup() {
    createCanvas(400, 300);
    background("lavender");
}
function draw() {
    for (var i = 1; i < 300; i += 6) { // first set of chrome lines;
      strokeWeight(2);
      stroke(mouseX-1, mouseX-5, mouseY-10);
      line(i, 0, i*10, 500);
    }
    for (y = 10; y < 300; y += 10) { //the yellow lines;
      stroke(255,250,205);
      strokeWeight(1.2);
      line(-i, y/400 + 30, 400, y*2);
    }
    for (i =0; i < 40; i++) { // white beams and orange beams;
      stroke("white");
      strokeWeight(0.2);
      line(1, i*1.5, i+200, 400);
      stroke("orange");
      line(i+400, 300, i*1.5, i*3.5);
    }
    for (i = 10; i <300; i += 3) { // coral pink lines at the bottom;
      var y1 = i*(30/400);
      stroke("pink");
      strokeWeight(0.5);
      line(i, y1*9, 90, 400);
    }
    for (h =0; h < 100;h +=8) { // floating blue lines;
      stroke("skyblue");
      var y1 = 170;
      var y2 = 23;
      line(h+20, y1, h*5 ,y2);
      y2 += y2
    }
}

I basically played around with the codes to get a better understanding of how each of the equations affect the shape and size of each set of line drawings. I also used color to identify each set of strings to show more distinction from one another.

Leave a Reply