Shannon Ha – Project 04 – String Art

sketch

//Shannon Ha
//Section D
//sha2@andrew.cmu.edu
//Project 04 String Art

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

function draw(){
  background(175,0,0);
  stroke('black')
  for (var i = 0; i < width; i+=20) {
    stroke(mouseX, mouseY, 210); //upper left corner arc
    line(mouseX-i,0,0,i+20);
    stroke(28,50,158);
    line(mouseX+i,0,0,i-20);
    stroke(255, 227, mouseX-10);//lower right corner arc
    line(mouseX-i,300,400,i-20);

}
  for (var i = 0; i < 500; i+=30) {
    push();
    translate(width/2, height/2);
    rotate(180);
    stroke(93,28,158);
    line(5,5, mouseX/2, i+1); //purple lines in the back
    rotate(90);
    line(5,5, mouseX/2, i+1);

    pop();
  }


    ellipseMode(CENTER); //the moving pupil of the eye
    noFill();
    ellipse(mouseX-200, height/2 ,100,100);
    strokeWeight(2);


  }

For this project I explored how the lines met to form arcs and curves through iteration and ultimately decided it would be fun to make the string art so that it looks like an eye!

Leave a Reply