xxxxxxxxxx
27
//A cake perhaps???
function setup() {
createCanvas(400, 200);
}
function draw() {
background("LemonChiffon");
//The loop code
//Top border
for (var x = 0; x < width; x += 30) {
noStroke();
fill("SaddleBrown");
ellipse(x, 10, 45);
}
//Bottom border
for (x = 0; x < width; x += 30) {
ellipse(x, 190, 45);
}
//Sprinkles
for (x = 5; x < width; x += 40) {
var y = height / 2;
rect(x, y, 30, 10, 5);
}
}