hschung-Project-04

sketch

// Heidi Chung
// Section A
// hschung@andrew.cmu.edu
// Project-04

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

function draw() {
    background(200, 90, 90);
     for (var i = -5; i < 350; i += 10) {

    var x1 = 0;
    var y1 = i * height/500;
    var x2 = i * height/300;
    var y2 = height;

      push();
      stroke(235, 130, 130); // peach lines that touch bottom of canvas
      strokeWeight(9);
      line(i*2 + 20, 500, 1.5*i, 120);
      pop();

      push();
      stroke(245, 185, 140); //thin short peach lines
      strokeWeight(3);
      line(1.5*i, 120, 1.2*i, 240);
      pop();

      push();
      stroke(111, 178, 173); //short blue lines
      strokeWeight(4);
      line(i*2 + 20, 240, 1.5*i, 120);
      pop();


      stroke(235, 130, 130);//left bottom corner pink underlay grid
      strokeWeight(3);
      line(x1, y1 +100, x2, y2);

      stroke(255); //white overlay grid
      strokeWeight(.5);
      line(x1, y1 +100, x2, y2);

      stroke(235, 130, 130); //top right pink overlay grid
      strokeWeight(.5);
      line(y2-width/2, x1, y1 +400, x2);

      stroke(235, 130, 130);//top left pink grid
      strokeWeight(1);
      line(y2, y2-width, x1, y1);

      stroke(239, 84, 84);//grid top left reddish pink
      strokeWeight(2);
      line(y2 + 100, y2-width, x1 + 100, y1);

      stroke(141, 219, 213); //light blue grid
      strokeWeight(1);
      line(y2 * i, x1, y1, x2);




    }

}

I didn’t have a clear image of what I wanted to make when I started this, except for the color palette surrounding peachy pinks. It took me a long time to conceptually understand how to use the for loop to make the lines appear in a curved grid. But I had some helpful explanations from my friends and that helped ground me a lot. I think I’ll need to keep practicing using for loops a lot.

Leave a Reply