Project 5: Wallpaper

My original idea for this project was to make a fabric pattern using florals (groundbreaking, I know!). For inspiration, I began by looking at prints from Lilly Pulitzer and Andy Warhol’s floral pop art.  However, as I began playing around with the code, the simple flower I started out with turned into an abstract “centerpiece” surrounded by ellipses that made rectangles around the sides. I ended up with a completely different deliverable, as you can see below.

sketch

/*Emma Shi
Section B
eyshi@andrew.cmu.edu
Project 5
*/
var petalL = 100;
var petalW = 40;
var rot = 45;

function setup() {
    createCanvas(600, 600);
    background("navy");
}

function draw() {

    for (var x = 0; x < 12; x++) {
        for (var y = 0; y < 12; y++) {

            var Petal = petalL * x;
            var innerL = petalL/x;
            var innerW = petalW*y;

            stroke("white");
            strokeWeight(2);
            noFill();

            push();
            translate(width/2, height/2);

            ellipse(0, 0, 25, 25);//center circle

            ellipse(Petal, 0, petalL, petalW);//petals of the right half of the inner "diamond"
            ellipse(Petal, 0, innerL, innerW);//inner petals of the right half of the inner "diamond"

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the upper right half 
            ellipse(Petal, 0, innerL, innerW);//inner petals of the upper right half

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the outer upper right half 
            ellipse(Petal, 0, innerL, innerW);//inner petals of the outer upper right half

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the upper right corner
            ellipse(Petal, 0, innerL, innerW);//inner petals of the upper right corner

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of upper mid right
            ellipse(Petal, 0, innerL, innerW);//inner petals of upper mid right

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the upper left
            ellipse(Petal, 0, innerL, innerW);//inner petals of the upper left

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the mid left
            ellipse(Petal, 0, innerL, innerW);//inner petals of the mid left

            rotate(radians(rot));
            ellipse(Petal, 0, petalL, petalW);//petals of the lower left
            ellipse(Petal, 0, innerL, innerW);//inner petals of the lower left
            pop();
    }
        }
        noLoop();

}

Leave a Reply