Xindi Lyu-Project 04-String art-Section A

sketch

 /*Xindi Lyu
 Section A
 xindil@andrew.cmu.edu
 project_04*/
 function setup() {
     createCanvas(400, 300);
     background(240);
}

 function draw() {
     background(240);
    
     var c=5;


     
     
      //background
      for(var b=0; b<150; b+=c){
        strokeWeight(0.5);
    stroke(120,200,230);
    line(400,b,4/3*b,0);//top-right corner
    stroke(200,200,230);
    line(0,b,400-4/3*b,0);//top-left corner
    stroke(130,170,170);
    line(400,300-b,4/3*b,300);//bottom-right corner
    stroke(250,170,170);
    line(0,300-b,400-4/3*b,300);//bottom left corner
   }


     
     for(var a=50; a<200; a+=c){
      strokeWeight(0.5);
      stroke(100,80,150);
      line(a,-4*a/3+850/3,a+150,4*a/3-150/3);//top of the triangle
      stroke(150,70,120);
      line(a+150,4*a/3-150/3,400-a,215);//the bottom-right corner of the triangle
      

     
 }
for(var a=50; a<200; a+=c){
      strokeWeight(0.5);
      stroke(100,80,150);
      line(a,4*a/3+50/3,a+150,-4*a/3+1000/3);//the btop part of the up-side-down triangle
      stroke(150,70,120);
      line(a,4*a/3+50/3,250-a,82);//the bottom left part of the -upside down triangle
      
      
    }
      
          



 }



	

For this project I experimented with line weights as well as the elegance of cooperating curves with sharper angles, and also symmetry and asymmetries.

Leave a Reply