Project 5 – Wallpaper Sara Frankel

Project 5

// Sara Frankel
// sfrankel
// Project 5
// section A

function setup() {
    createCanvas(600, 600);
    background('lightgreen');

    stroke('green');
    strokeWeight(2);
    for (var xback = 10; xback < width; xback += 20) { //green stripes placed in setup so that they are not redrawn everytime it is called
    	line(xback, 0, xback, height);
    }
    noLoop();
}

function draw() {
	stroke(0);
	strokeWeight(1);
	var diameter = 120;
	for (var xcircle = 0; xcircle < width + diameter/2; xcircle += 155) { // positions and redraws the lemons and limes along the x axis
		for (var ycircle = 0; ycircle < height + diameter/2; ycircle += 155){ // positions and redraws the lemons and limes along the y axis
			fill('orange');
			ellipse(xcircle, ycircle, diameter, diameter);
			fill(243,185,80);
			ellipse(xcircle, ycircle, diameter/2 + 40, diameter/2 + 40);
			
			if(ycircle % 2 === 0) { //makes every odd line, every lemon, the color yellow
				fill(255,255,153);
				ellipse(xcircle, ycircle, diameter, diameter);
				fill('yellow');
				ellipse(xcircle, ycircle, diameter/2 + 40, diameter/2 + 40);
			} 
			
			for (var i = 0; i < 6; i++) { //forms the slices of the citrus fruit
				var angle = i * radians(60);
				line(xcircle, ycircle, (diameter/3) * cos(angle) + xcircle , 
					ycircle + (diameter/3) * sin(angle));
			}	
		
		}
	}
}

For this project, I decided to make it citrus/summer theme. I made the backdrop watermelon inspired (with the green stripes) and made each row of citrus fruit alternate between oranges and lemons. As the weather gets colder, its sometimes nice to think of the beloved themes of summer.  Below is my sketch, please excuse my artistic ability but I came into the idea thinking about summer and warm beaches (and what is lovely to drink/eat by the ocean).

Leave a Reply