selinal-Project-05

sketch

//Selina Lee
//Section C
//selinal@andrew.cmu.edu
//Project-05

function setup() {
    createCanvas(480, 360);
    background(255, 255, 120); //light yellow background

    for(var row = 0; row < 60; row++) { //creating grid of 60x80 for design
    	for(var col = 0; col < 80; col++) { 
    		stroke(230, 230, 150, 40); //light beige stripes
    		strokeWeight(3);
    		line(col*6 + 3, 0, col*6 + 3, width); //spacing the stripes 6 units apart and centering the space by three units from the origin

    		push(); //start of a rotation
    		noStroke(); 
    		fill(255, 200, 150, 150); //orange hue
    		rotate(radians(32)); //rotate the shape by 32 degrees
    		ellipse(row * 20 + 12, col * 40 - 260, 7, 3); //diagonal rows of ellipses more in the horizontal direction that are 20 units apart
    		rotate(radians(70)); //rotate shape by 70 degrees so that it is in a more upward direction
    		ellipse(row * 20 - 80, col * 40 - 800, 6, 2); //shifting the ellipse lines up and over to the right more
    		pop(); //confining the rotation
    	}
    }

    for(var petalx = 0; petalx < 4; petalx++) { //creating flowers with 4 columns
    	for(var petaly = 0; petaly < 3; petaly++) { //flowers in 3 rows
    		noFill();
    		stroke(180, 230, 100); //green flower stems
    		strokeWeight(3); //stroke weight of 3
    		beginShape(); 
    		curveVertex(petalx * 120 + 75, petaly * 120 + 50); //flower stem starting at center point of white ellipse (see below)
    		curveVertex(petalx * 120 + 75, petaly * 120 + 50);
    		curveVertex(petalx * 120 + 65, petaly * 120 + 70); //midpoints of stem where curve shape happens
    		curveVertex(petalx * 120 + 65, petaly * 120 + 90); //other mid point
    		curveVertex(petalx * 120 + 70, petaly * 120 + 110); //finishing point below main shape of flower
    		curveVertex(petalx * 120 + 70, petaly * 120 + 110);
    		endShape();

    		noStroke();

    		fill(255, 255, 250); //main off-white flower center
    		ellipse(petalx * 120 + 75, petaly * 120 + 50, 10, 10); //centerpoint

    		fill(200, 100, 255, 130); //indigo color of flower with 130 transparency to fit in better with opposing color of yellow
    		ellipse(petalx * 120 + 65, petaly * 120 + 45, 20, 5); //three horizontal ellipse petals 
    		ellipse(petalx * 120 + 60, petaly * 120 + 50, 20, 5);
    		ellipse(petalx * 120 + 65, petaly * 120 + 55, 20, 5);

    		ellipse(petalx * 120 + 80, petaly * 120 + 40, 5, 20); // three vertical ellipse petals to show series of abstraction in flower
    		ellipse(petalx * 120 + 85, petaly * 120 + 50, 5, 20);
    		ellipse(petalx * 120 + 80, petaly * 120 + 60, 5, 20);
    	
    	}
    }

    noLoop();

}

function draw() {
}

Leave a Reply