Katrina Hu – Project 04 – String Art

sketch_project4

/*Katrina Hu
15104-C
kfh@andrew.cmu.edu
Project-04-String Art*/


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

function draw() {
    background(0);
    //yellow curve
    for(var i = 0; i < 400; i += 5) {
        stroke(255, 250, 158);
        strokeWeight(0.5);
        line(i, mouseY, 400 , i);
    }
    //green curve
    for(var b = 0; b < 400; b += 5) {
        stroke(167, 255, 158);
        strokeWeight(0.5);
        line(b, mouseX, 400 , b);
    }
    //pink curve
    for(var a = 0; a < 400; a += 5) {
        stroke(255, 158, 158);
        strokeWeight(0.5);
        line(mouseY, a, a, 300);
    }
    //blue curve
    for(var c = 0; c < 400; c += 5) {
        stroke(158, 243, 255);
        strokeWeight(0.5);
        line(mouseX, c, c, 300);
    }
}

This was a fun project to do to experiment with different lines and colors. It was also interesting so see how the lines shifted with the mouse.

Leave a Reply