Kyle Lee Line Art

I wanted to keep the pattern simple and clean. Although this isn’t as groundbreaking or experimental, I certainly helped me understand how to use for loops to create curves.

 

kdlee-project-04

function setup() {
    createCanvas(600, 600);
}

function draw() {
    background(255);//white
    strokeWeight(1);//thin line
    var spacing = 25; // How far apart is each line
    var increment = 50;// double spacing, offsets lines, growth

    for (var i = 0; i < 25; i = i + 1) {//20 lines
        var x = (0 + i * spacing);
        var y = (0 + i * spacing);

        stroke("#FC4BAB");//pink
        line(x, 0, width, y);

        stroke("#FCCA53");//yellow
        line(0, y, x, height);

        stroke("#03C9BA");//green
        line(0, y, width - x, 0);

        stroke("#343AE9");//blue
        line(x, height, width, height - y);
    }
}

Leave a Reply