Katrina Hu – Project 05 – Wallpaper

sketch_project05

/*Katrina Hu
15104-C
kfh@andrew.cmu.edu
Project-05-Wallpaper*/

function setup() {
    createCanvas(570, 570);
    //background(255, 203, 196);
    background(0);
}

function draw() {
    //flower
    noStroke();
    for (var y = 0.5; y < 7; y++) {
        for (var x = 0.5; x < 7; x++) {
            fill(255);
            ellipse(y * 80, x * 80, 40, 10);
            ellipse(y * 80, x * 80, 10, 40);
            fill(255, 245, 173);
            ellipse(y * 80, x * 80, 25, 25);
            fill(186, 209, 255);
            ellipse(y * 80, x * 80, 10, 10);
        }

    }
    //small polka dots
    for (var y = 0.5; y < 6; y++) {
        for (var x = 0.5; x < 6; x++) {
            fill(255);
            ellipse(y * 80 + 40, x * 80 + 40, 5, 5);
        }
    }
}

This was a fun project to experiment with various shapes and how to create a design from them. I enjoyed seeing how the for loop would change the design.

The initial design sketch

Leave a Reply