Julia Nishizaki – Project 04 – String Art

sketch

//Julia Nishizaki
//Section B
//jnishiza@andrew.cmu.edu
//Project-04-String Art

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

function draw() {
    background(19, 120, 160); //blue background
    //Strings
    for (var i = 0; i < width; i ++) {
        //layer 1, light blue, semi transparent
        stroke(207, 239, 255, 75);
        line(0, i * 5, i * (mouseX / 5), height);
        line(width, height - (i * 5), width - (i * (mouseX / 5)), 0);
        line(width, i * 5, width - (i * (mouseX / 5)), height);
        line(0, height - (i * 5), i * (mouseX / 5), 0);
        //layer 2, dark blue, semi transparent
        stroke(9, 73, 112, 75);
        line(i * 5, 0, width, i * (mouseY / 5));
        line(width - (i * 5), height, 0, height - (i * (mouseY / 5)));
        line(i * 5, height, width, height - (i * (mouseY / 5)));
        line(width - (i * 5), 0, 0, i * (mouseY / 5));
    }
}

For this project, I wanted to make something fairly simple and geometric that you could play with and manipulate with your mouse. While creating the lines, their movement and elegant nature reminded me of lace or weaving, so I decided to go with softer colors.

Leave a Reply