Jenni Lee — Project 04 — String Art


Jenni Lee — Project 04 — Dynamic Drawing

/* Jenni Lee
Section E
jennife5@andrew.cmu.edu
Project-04
*/

function setup() {
  createCanvas(800, 600);
  background(175);
  noLoop ();
}

function draw() {
  var i;
  for (i = 0; i < width; i += 10) {

// line connecting from top boundary line, starting from 0 and increment by 10 pixels, 
// to right boundary line, from top to bottom, increment by evenly divided height
    stroke (219, 79, 149);
    line (i, 0, width, lerp (0, height, i/width)); // lerp is to evenly divide the height with corresponding increment on width
    
    stroke (135, 96, 116);
    line (width - i, 0, 0, lerp (0, height, i/width));

    stroke (239, 218, 229);
    line (i, height, width, height - lerp (0, height, i/width));

    stroke (155, 59, 107);
    line (width - i, height, 0, height - lerp (0, height, i/width));

// line connecting from top boundary line, starting from 0 and increment by 10 pixels, 
// to right boundary line, from top to middle of height, increment by evenly divided height/2
    stroke (135, 96, 116);
    line (i, 0, width, lerp (0, height/2, i/width));
      
    stroke (219, 79, 149);
    line (width - i, 0, 0, lerp (0, height/2, i/width));
 
    stroke (155, 59, 107);
    line (i, height, width, height - lerp (0, height/2, i/width));

    stroke (239, 218, 229);
    line (width - i, height, 0, height - lerp (0, height/2, i/width));
    
// line connecting from top boundary line, starting from 0 and increment by 10 pixels, 
// to right boundary line, from top to 1/4 of height, increment by evenly divided height/4
    stroke (239, 218, 229);
    line (i, 0, width, lerp (0, height/4, i/width));
   
    stroke (219, 79, 149);
    line (width - i, 0, 0, lerp (0, height/4, i/width));
 
    stroke (135, 96, 116);
    line (i, height, width, height - lerp (0, height/4, i/width));

    stroke (155, 59, 107);
    line (width - i, height, 0, height - lerp (0, height/4, i/width));    
  }
}

Pink is my favorite color, so for this project, I wanted to play around with various shades of pink. Upon reflection of this piece, it’s almost a bit reminiscent of a rose of some sort of red/pink-ish flower. It took me a couple sketches for me to fully map out how I wanted to set everything up, as it was initially difficult for me to conceptualize everything, but ultimately, it was an enjoyable project.

Leave a Reply