Jacky Tian’s project 04

jacky’s sketch 1



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

function draw() {
    background(0)
    for (var i = 0; i < 21; i++) {
        stroke(255, 0, 0);
        line(width/5+i*10, 0, 0, height/2+i*(-5)); //line set 1

        stroke(255)
        line(0, height/2+i*10, width/3+i*(-5), 0); //line set 2

        stroke(0, 255, 0);
        line(0, height/3+i*10, width/2+i*(10), height);  //line set 3

        stroke(0, 0, 255);
        line(width, height/7+i*10, width*3/4+i*(-10), height); //line set 4

        stroke(150, 80, 0);
        line(width, height/7+i*10, width/4+i*(10), 0); //line set 5

    

        // stroke(100, 0, 100);
        // line(width/5+i*10, 0, 0, height/2+i*(-5));
        
    }
}

In this project, I created five sets of lines rotating along the sides to create five curves. The background is black so that it makes the colors more obvious.

Leave a Reply