mjanco-Assignment-04-String-Art-Section-B

stringart

//Michelle Janco
//Section B
//mjanco@andrew.cmu.edu
//Project-04-String-Art

var x2 = 1;
var y1 = 1;
var y2 = 0;
var xInc = 300;
var yInc = 400;

function setup() {
    createCanvas(400, 300);
    background(249,214,86);
}

function draw() {
  for (var x1 = 0; x1 < width; x1 += 5) {
    var y1 = x1 * .50;
    stroke(250,150,0);
    //vertical lines
    line(x1, y1, x1-80, y2);
    //upper right curve
    line(x2*yInc, y1, x1, y2);
    //diagonal center lines
    line(x2-100, yInc-65, x1, y1);
    //center triangular form
    stroke(240,100,0);
    line(yInc+40, x2*xInc, x1, y1);
    //upper right smaller curve
    stroke(240,100,0);
    line(xInc+65, y1+40, x1+20, y2);
    //bottom left curve
    stroke(250,150,0);
    line(x1, xInc, x2, y1);
    //lower left smaller curve
    stroke(240,100,0);
    line(x1-10, xInc-60, x2+35, y1);
  }
}

I found this assignment quite difficult because I did not have a clear vision going into it. This result is primarily from trying different things and seeing what works. However, I did enjoy playing with the color scheme.

Leave a Reply