sajohnso-project-05

wallpaper

/*
*Sadie Johnson
*15-104 Section C
*sajohnso@andrew.cmu.edu
*Project-05
*This program draws wallpaper
*/
function setup() {
    createCanvas(800, 600);
    background('#F9F4F0');
}

function draw() {

for(var y=0; y<600; y+=200){
	for(var x=0; x<800; x+=200){
		drawPattern(x, y);
	}

}
}

function drawPattern (x, y){
	//BASE OF FLOWERS
		noStroke();
		fill('#FED1D6');
		ellipse(x+50,y+110,40,40); //small, leftmost flower
		ellipse(x+120,y+140,70,70); //biggest flower
		ellipse(x+115,y+65,30,30); //small, rightmost flower

	//INSIDE OF FLOWERS
		fill('#F497AA');
		ellipse(x+40,y+110,15,20); //small, leftmost flower
		ellipse(x+124,y+154,50,40); //middle of biggest flower
		ellipse(x+120,y+63,15,15); //middle of rightmost

	//LEAVES
		//bottom left grouping
			strokeWeight(6);
			stroke("#AFDDC3");
			line(x+67, y+130, x+50, y+150);
			strokeWeight(9);
			line(x+67, y+130, x+63, y+165);
			line(x+69, y+130, x+80, y+180);
		//top left leaf grouping
			strokeWeight(11);
			line(x+55, y+83, x+30, y+70);
			line(x+80, y+100, x+60, y+50);
			line(x+80, y+100, x+120, y+90);
			strokeWeight(15);
			line(x+80, y+100, x+90, y+25);
}

 

The most time-consuming part of this process was actually drawing the flower design, and not making the design repeat. It didn’t come out quite as floral as I had planned, but it’s aesthetically pleasing anyways.

img_6718

Leave a Reply