Project 5

sketch.js


var d = 20

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

}

function draw() {
    background(0);
    for (var i=0;i<50;i+=1){
        for(var j =-10; j < 50;j +=1){
            fill (255,140);
            rect((50 + j *d * 1.5) + i * 15, 25 +(i *d *1.5), d+20, d); //offsets 

        }
    }
}
    

I created an optical allusion using for loop and offsetting the rectangles so when you look far away you can’t tell if the black negative spaces are straight or not.

Leave a Reply