Yoo Jin Shin-Project-04-String-Art

Project-04

// Yoo Jin Shin
// Section D
// yoojins@andrew.cmu.edu
// Project-04


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

function draw() {
    background(0);

    // two white-ish rectangles in background
    fill(235);
    noStroke();
    rect(0, 220, width, 80);
    rect(0, 0, width, 80);

    var x1;
    var x2;
    var y1;
    var y2;

    var stepSize1 = 7.5;
    var stepSize2 = 10;
    var stepSize3 = 7;
    var stepSize4 = 3;

    // dark grey lines
    for (x2 = 0; x2 < width; x2 += stepSize2) {
        x1 = 0;
        y1 = 0;
        y2 = height;
        stroke(70);
        strokeWeight(1);
        line(x1, y1, x2, y2);
    }

    // dark blue lines 
    for (x1 = 0; x1 < width; x1 += stepSize1) {
        stroke(0, 0, 255);
        strokeWeight(1.5);
        line(x1, y1 += 2, x2 -= 10, y2 -= 1);
    }

    // dark pink lines 
    for (x1 = 0; x1 < width; x1 += stepSize1) {
        stroke(255, 200, 255);
        strokeWeight(2);
        line(x1, y1 += 4.5, x2 += 14.9, y2 -= 1.2);
    }

    // white lines
    for (x2 = 0; x2 < width; x2 += stepSize3) {
        x1 = width;
        stroke(255);
        strokeWeight(1.5);
        line(x1 -= 10, y1 -= 80, x2, y2 += 10);
    }

    // black circle in center background
    fill(0);
    noStroke();
    ellipse(width / 2, height / 2, 180, 180);

    // purple lines
    for (y2 = 0; y2 < height; y2 += stepSize4) {
        stroke(160, 50, 255);
        strokeWeight(1.5);
        line(x1 += 100, y1 += 30.5, x2 -= 5.6, y2);
    }

    noLoop();
}

It was interesting to experiment with the different types of lines and curves to create this string art. I think the sound-art article that I read recently about the Multiverse and black holes subconsciously influenced my design.

Leave a Reply