monicah1-project-05

sketch

function setup() {
    createCanvas(450, 450);
    background(10,125,185);
    noStroke();
    var tw = 60;
    var th = tw*(sqrt(3/2));
    var oy = 0;
    var ox = 0;
    var numc = 0;

    for (var y = 0; y < 10; y++) {
    	if (y%2==0){
        	numc = 10;
    	}
    	else {
    		numc = 9
    	}
        for (var x = 0; x < numc; x++) {
            var py = oy + y * th;
            var px = ox + x * tw;
     

		if (y%2 == 0){
			fill(210,255,0);
			ellipse(px,py,50,50);
			fill(255,0,160);
			rect(px,py,20,20);
		}
		else{
			fill(210,255,0);
			ellipse(px+30,py,50,50);
			fill(0,30,255);
			rect(px-10,py,40,40);
		}
		}
	}
}

 

I played with shapes, patterns, and colors. I liked playing with size and ratio, creating depth.

Leave a Reply