Project 4: String Art

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

function draw() {
  background(140);

  
  for (var i = 0; i < 590; i++) {

 
  var x1 = 0;
  var x2 = i*width/30;
  var y1 = i*height/59;
  var y2 = height;

  strokeWeight(0.7); 

  
  stroke(200, 103, 98);
  line(x1, y1, x2+100, y2);


  stroke(155,109,90);
  line(x2, 0, x1*2, height-y1);

  
  stroke(147,55,91);
  line(width, height-y1, x2*2, y2);


  stroke(46,56,64);
  line(x2, 4, width, y1);

  stroke(65,50,123);
  line(width+200, height-190, x2-999, height);

  
  stroke(200,85,45);
  line(width/2,height/2, x2, y1);
  }
}

Leave a Reply