KadeStewart-Project05-Wallpaper

sketch

//Kade Stewart
//Section B
//kades
//Project-05


function setup() {
    createCanvas(480, 480);
    background(128);

    noStroke();
}


function draw() {

    var dim = 8;
    for (x = 0; x < dim; x++) {
        for (y = 0; y < dim; y++) {
            tile(x * width/dim, y * height/dim, width/dim, height/dim);
        }
    }

    

}

function tile(x, y, w, h) {
    fill(14,174,158); //light blue
    triangle(x, y, x, y + h, x + w/2, y + h/2);

    fill(255,209,80); //orange
    triangle(x + w, y, x + w, y + h, x + w/2, y + h/2);

    fill(12,18,111); //dark blue
    triangle(x, y, x + w, y, x + w/2, y + h/2);

    fill(240,240,240); //off-white
    triangle(x, y + h, x + w, y + h, x + w/2, y + h/2);

}

My wallpaper is meant to be viewed in a number of different ways. The tiles could be seen as squares of four triangles, as triangles made up of other triangles, or as a pyramid dark blue sky, yellow-orange side in the light, lighter blue in the shade, white ground). I was inspired by my favorite elementary school playtime activity – mosaic tiles.

Leave a Reply