sketchDownload
function setup() {
createCanvas(600, 600);
background(0);
noLoop();
}
function draw() {
//big pumpkins
for(var s = 100; s < height-90; s +=400){
for(var d = 100; d < width-80; d+=400){
pumpkin1(d, s);
}
}
for(var s = 300; s < height-90; s +=400){
for(var d = 300; d < width-80; d+=400){
pumpkin1(d, s);
}
}
//little pumpkins
for(var m = 300; m < height-90; m +=400){
for(var j = 100; j < width-80; j+=400){
pumpkin2(j, m);
}
}
for(var m = 100; m < height-90; m +=400){
for(var j = 300; j < width-80; j+=400){
pumpkin2(j, m);
}
}
//star
for(var s = 100; s < height+50; s +=200){
for(var d = 0; d < width+50; d+=200){
star1(d, s);
}
}
//star
for(var s = 0; s < height+50; s +=200){
for(var d = 100; d < width+50; d+=200){
star2(d, s);
}
}
}
//big pumpkin
function pumpkin1(x,y) {
push();
translate(x,y);
rotate(radians(20));
noStroke();
//strokeWeight(1.5);
//stroke(0, 100, 20);
fill(0, 198, 51);
rect(-5, -35, 10, 13);
//stroke(176, 45, 36);
fill(241, 90, 41);
ellipse(25, 3, 40, 60);
ellipse(-25, 3, 40, 60);
ellipse(13, 3, 40, 62);
ellipse(-13, 3, 40, 62);
ellipse(0, 3, 40, 64);
fill(247, 148, 29);
triangle(-20, -5, -4, -2, -12, -16);
triangle(20, -5, 4, -2, 12, -16);
triangle(-6, 8, 6, 8, 0, -2);
arc(1, 11.5, 55, 29, radians(0), radians(180), CHORD);
fill(241, 90, 41);
rect(9, 10, 8, 5.5);
noStroke();
rect(8, 7, 9.9, 4);
pop();
}
//little pumpkin
function pumpkin2(x,y) {
push();
translate(x,y);
rotate(radians(-20));
noStroke();
//strokeWeight(1.5);
//stroke(0, 100, 20);
fill(0, 198, 51);
rect(-5, -20, 10, 13);
//stroke(176, 45, 36);
fill(241, 90, 41);
ellipse(20, 5, 30, 40);
ellipse(-20, 5, 30, 40);
ellipse(10, 5, 30, 40);
ellipse(-10, 5, 30, 40);
ellipse(0, 5, 30, 40);
fill(247, 148, 29);
ellipse(-10, 2, 10, 10);
ellipse(10, 2, 10, 10);
rect(-2, 2, 4, 4);
arc(0, 10, 20, 15, radians(0), radians(180), CHORD);
fill(241, 90, 41);
rect(3, 8.2, 4, 4);
noStroke();
rect(2, 7.2, 6, 2.1);
pop();
}
//big star
function star1(x, y) {
push();
translate(x,y);
strokeWeight(1.5);
rotate(radians(-20));
fill(255, 251, 202);
beginShape();
vertex(-16, -3.5);
vertex(-5, -5);
vertex(0,-16);
vertex(5, -5);
vertex(16, -3.5);
vertex(8, 4);
vertex(10, 16);
vertex(0, 10);
vertex(-10, 16);
vertex(-8, 4);
endShape(CLOSE);
pop();
}
//small star
function star2(x, y) {
push();
translate(x,y);
strokeWeight(1.5);
rotate(radians(20));
fill(255, 251, 202);
beginShape();
vertex(-8, -1.75);
vertex(-2.5, -2.5);
vertex(0,-8);
vertex(2.5, -2.5);
vertex(8, -1.75);
vertex(4, 2);
vertex(5, 8);
vertex(0, 5);
vertex(-5, 8);
vertex(-4, 2);
endShape(CLOSE);
pop();
}