Jasmine Lee – Project 04 – String Art

strings

//Jasmine Lee
//Section C
//jasmine4@andrew.cmu.edu
//Project-04 (String Art)

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

function draw() {
    //black background
    background(100);
   
    //left(white) half of the vertical lines
    for (var a = 0; a < 151; a += 2) {
        stroke(255);
        line(a, mouseY, a, mouseX);
    }

    //right(black) half of the vertical lines
    for (var b = 150; b < 301; b += 2) {
        stroke(0);
        line(b, mouseY, b, mouseX);
    }

    //top(white) half of the horizontal lines
    for (var c = 0; c < 201; c += 2){
        stroke(255);
        line(mouseX, c, mouseY, c);
    }

    //bottom(black) half of the horizontal lines)
    for (var d = 200; d < 401; d += 2){
        stroke(0);
        line(mouseX, d, mouseY, d);
    }

    //creates white "plus" sign 
    fill(255);
    rectMode(CENTER);
    noStroke();
    rect(150, 200, 20, 200);
    rect(150, 200, 200, 20);

    //creates the curves in all four corners
    for (var e = 0; e < 300; e += 2) {
        stroke(0);
        //top left corner
        line(0, height - e * 1.5, e, 0);
        //bottom right corner
        line(e, height, width, height - e * 1.5);
        stroke(255);
        //top right corner
        line(width, height - e * 1.5, width - e, 0);
        //bottom left corner
        line(width - e, height, 0, height - e * 1.5);
    }

}

For my string art, I wanted to create a piece with a dystopian feeling to it. I decided to use a strong composition, with a symbol right in the middle of the canvas, and animated strings that give a disoriented effect to the viewer.

Leave a Reply