afukuda-project-05-wallpaper
var diamondXvar xvar y
function setup() {
createCanvas(400, 480);
}
function draw() {
background(140, 164, 212);
stroke(219, 242, 248);
for (y = 0; y <481; y += 80) {
for (x = 0; x < 481; x += 80) {
if (x%160 == 0) { line(x, y, x+80, y); line(x, y+40, x+40, y); line(x, y+40, x+40, y+80) line(x+40, y, x+80, y+40); line(x+40, y+80, x+80, y+40);
for (diamondX = 0; diamondX < 41; diamondX += 8) {
if (y%160 == 0) { line(x+40, y, x+diamondX, (y+40)+diamondX); line(x+40, y, (x+40)+diamondX, (y+80)-diamondX);
push();
fill(193, 228, 221);
beginShape();
vertex(x, y);
vertex(x+40, y);
vertex(x, y+40);
endShape();
pop();
push();
fill(209, 226, 244);
beginShape();
vertex(x, y);
vertex(x, y-40);
vertex(x+40, y);
endShape();
pop();
}
else { line(x+40, y+80, x+diamondX, (y+40)-diamondX); line(x+40, y+80, (x+40)+diamondX, y+diamondX);
noFill();
ellipse(x-40, y, 138, 80); arc(x+40, y-40, 138, 80, 0, PI); arc(x+40, y+40, 138, 80, PI, 0);
push();
fill(193, 228, 221);
beginShape();
vertex(x+40, y+80);
vertex(x+80, y+40);
vertex(x+80, y+80);
endShape();
pop();
push();
fill(209, 226, 244);
beginShape();
vertex(x+40, y-80);
vertex(x+80, y-80);
vertex(x+80, y-40);
endShape();
pop();
}
}
}
else {
line(x, y+40, x+80, y+40);
line(x, y, x+40, y+40); line(x+40, y+40, x, y+80); line(x+40, y+40, x+80, y); line(x+40, y+40, x+80, y+80);
if (y%160 == 0) { line(x, y-40, x, y+40); line(x+80, y-40, x+80, y+40);
push();
fill(253, 203, 167);
beginShape();
vertex(x, y);
vertex(x+40, y-40);
vertex(x+80, y);
vertex((x+80)-(20/sqrt(2)-5), y+10);
vertex(x+40, y-20);
vertex(x+(20/sqrt(2)-5), y+10);
endShape();
pop();
ellipseMode(CENTER);
fill(249, 200, 203);
ellipse(x+40, y+26, 20, 20);
}
else { fill(249, 200, 203);
ellipse(x+40, y-25, 20, 20);
push();
fill(253, 203, 167);
beginShape();
vertex(x, y);
vertex(x+(20/sqrt(2)-3), y-10);
vertex(x+40, y+20);
vertex((x+80)-(20/sqrt(2)-5), y-10);
vertex(x+80, y);
vertex(x+40, y+40);
endShape();
pop();
}
}
}
}
}
My wallpaper was inspired by this geometric pattern I came across while brainstorming for ideas. One thing I noticed upon completing the base of the pattern, was that while it does exhibit a degree of offset row by row, it still had a very strong vertical presence. In order to mitigate the verticality of the pattern I incorporated the overlapping ellipses to create a floral, petal-like design horizontally across the canvas. Finally I added some colors in specific moments to make the wallpaper stand out more.