SooA Kim – 04 – String-Art

sketch

/* SooA Kim
Section D
sookim@andrew.cmu.edu
Assignment 04 -String Art */


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

function draw() {
    background(0);

    for (var i = 0; i < 200; i+= 2) {
        stroke("gold");
        strokeWeight(1);
        line(i, height, 0, 5*i);
        stroke("red");
        line(4*i, height, 0, 4*i);
        stroke("pink");
        line(7*i, height, 0, 3*i);
        stroke("blue")
        line(10*i, height, 0, 2*i);
        stroke("purple");
        line(13*i, height, 0, 1.5*i);
    }
    
    for (var i = 0; i < 100; i+= 10) {
        stroke(255, 109, 0);
        strokeWeight(1);
        line(i/4, i, i*4, height/2);
        line(i/4, height - i, i*4, height/2);
        stroke(mouseX, 255, mouseY);
        strokeWeight(mouseX);
        line(width - (i*2), 0, i * 2, height);
        line(width - (i*2), height, (i*2), 0);

    }

}



For this assignment, I tried to create this abstract wave forms.  Then, I ended up also attempting to make some symmetrical lines to understand better how line coordinates work using loop functions. It was very confusing, I would need more practice to get used to it.

Leave a Reply