xxxxxxxxxx
149
// Drawing exercise based on what I learned from The Code Train
// by Meritxell Gimeenez
//https://www.saltandcolor.com/
function setup() {
createCanvas(452, 660);
background("#eaeae5");
}
function draw() {
noStroke();
ellipseMode(CORNER);
strokeWeight(1);
// row 1
fill("#44635D");
arc(20, -30, 100, 100, 0, PI, PIE);
fill("#A0907F");
arc(20, 70, 100, 100, PI, TWO_PI, PIE);
fill("#BF7839");
arc(174, 20, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("black");
arc(74, 20, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("black");
arc(228, -30, 100, 100, 0, PI, PIE);
arc(228, 70, 100, 100, PI, TWO_PI, PIE);
//arc(332, -30, 100, 100, 0, PI, PIE);
//arc(332, 70, 100, 100, PI, TWO_PI, PIE);
rect(332, 20, 100, 100);
// row 2
fill("black");
arc(20, 74, 100, 100, 0, PI, PIE);
fill("#914523");
arc(20, 174, 100, 100, PI, TWO_PI, PIE);
fill("black");
arc(174, 124, 100, 100, HALF_PI, PI + HALF_PI, PIE);
arc(74, 124, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("#BF7839");
arc(278, 124, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("#A0907F");
arc(178, 124, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("#44635D");
ellipse(332, 124, 100, 100);
// row 3
fill("#BF7839");
arc(70, 228, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("black");
arc(-30, 228, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("black");
ellipse(124, 228, 100, 100);
stroke("black");
strokeWeight(2);
line(228, 228, 328, 228);
line(228, 233, 328, 233);
line(228, 238, 328, 238);
line(228, 243, 328, 243);
line(228, 248, 328, 248);
line(228, 253, 328, 253);
line(228, 258, 328, 258);
line(228, 263, 328, 263);
line(228, 268, 328, 268);
line(228, 273, 328, 273);
line(228, 278, 328, 278);
line(228, 283, 328, 283);
line(228, 288, 328, 288);
line(228, 293, 328, 293);
line(228, 298, 328, 298);
line(228, 303, 328, 303);
line(228, 308, 328, 308);
line(228, 313, 328, 313);
line(228, 318, 328, 318);
line(228, 323, 328, 323);
line(228, 328, 328, 328);
noStroke();
fill("black");
arc(332, 178, 100, 100, 0, PI, PIE);
fill("#914523");
arc(332, 278, 100, 100, PI, TWO_PI, PIE);
// row 4
fill("black");
rect(20, 332, 100, 100);
fill("#914523");
arc(124, 282, 100, 100, 0, PI, PIE);
fill("#44635D");
arc(124, 382, 100, 100, PI, TWO_PI, PIE);
fill("#A0907F");
ellipse(228, 332, 100, 100);
fill("#BF7839");
arc(332, 282, 100, 100, 0, PI, PIE);
fill("black");
arc(332, 382, 100, 100, PI, TWO_PI, PIE);
// row 5
fill("#BF7839");
arc(70, 436, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("#44635D");
arc(-30, 436, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("black");
arc(174, 436, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("black");
arc(74, 436, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("black");
arc(228, 386, 100, 100, 0, PI, PIE);
fill("#914523");
arc(228, 486, 100, 100, PI, TWO_PI, PIE);
fill("#A0907F");
arc(382, 436, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("#44635D");
arc(282, 436, 100, 100, PI + HALF_PI, HALF_PI, PIE);
// row 6
fill("black");
ellipse(20, 540, 100, 100);
fill("#BF7839");
arc(174, 540, 100, 100, HALF_PI, PI + HALF_PI, PIE);
fill("#914523");
arc(74, 540, 100, 100, PI + HALF_PI, HALF_PI, PIE);
fill("black");
rect(228, 540, 100, 100);
fill("#44635D");
arc(332, 490, 100, 100, 0, PI, PIE);
fill("#A0907F");
arc(332, 590, 100, 100, PI, TWO_PI, PIE);
}