Project-04-String-Art

I created a string art in which consists of lines that are sort of symmetric and floating lines according to the position of mouse.

sketch

//Jae Son, Section C

function setup() {
    createCanvas(400, 300);
    background(220);
}

function draw() {
  background(55,40,39);
  for (var i  = 0;  i <= 250; i+=2){
    strokeWeight(1);
    //yellow line -left
    stroke(240,227,30);
    line(i*2, height, 0, 3*i);
    //purple line -left
    stroke(104,99,154);
    line(i*5, height, 0, 3*i);
    //pink line -left
    stroke(181,134,132);
    line(i*8, height, 0, 3*i);
    //yellow line -right
    stroke(240,227,30);
    line(width,i*2,3*i,0);
    //purple line -right
    stroke(104,99,154);
    line(width,i*5,3*i,0);
    //pink line -right
    stroke(181,134,132);
    line(width,i*8,3*i,0);
  }
  
  for (var i = 0; i <= 300; i++) {
    strokeWeight(0.5);
    //moving orange line
    stroke(249,211,140);
    line(mouseX,i*3,i*2,mouseY);
    //moving turquoise line
    stroke(148,224,226);
     line(i*3,mouseY,mouseX,i);
  }
  

  
}

Leave a Reply