/*
Judy Li
Section A
judyli@andrew.cmu.edu
Project-05
*/
function setup() {
createCanvas(480, 480);
background("pink");
noStroke();
}
function draw() {
var tw = 60;
var th = 60;
var oy = 60;
var ox = 60;
for (var i = 0; i < width; i = i + 5) {
stroke(255);
line(i, 0, i, height);
}
for (var y = 0; y < 8; y++) {
noStroke();
for (var x = 0; x < 7; x++) {
var py = oy + y * (sqrt(3) * (th / 2));
var px = ox + x * tw;
for (var x = 0; x < 6; x++) {
var py = oy + y * (sqrt(3) * (th / 2));
var px = ox + x * tw;
if (y % 2 != 0) {
py = oy + y * (sqrt(3) * (th / 2));
px = ox + x * tw;
fill(128, 206, 214);
arc(px + (tw / 2), py, 50, 50, PI - QUARTER_PI, TWO_PI - QUARTER_PI);
fill(213, 244, 230);
arc(px + (tw / 2), py, 50, 50, TWO_PI - QUARTER_PI, PI - QUARTER_PI);
}
else {
fill (97, 134, 133);
arc(px, py, 50, 50, QUARTER_PI, PI + QUARTER_PI);
fill (254, 251, 216);
arc(px, py, 50, 50, PI + QUARTER_PI, QUARTER_PI);
}
}
if (y % 2 == 0) {
fill(97, 134, 133);
arc(px + tw, py, 50, 50, QUARTER_PI, PI + QUARTER_PI);
fill (254, 251, 216);
arc(px + tw, py, 50, 50, PI + QUARTER_PI, QUARTER_PI);
}
}
}
noLoop();
}
I found two wallpapers from Pinterest that I really liked. But, the goals of this project was to create one static wallpaper. So, I wanted to combine the two I found to create my own wallpaper. I think that the base of my project can serve to be useful for adding more details to the wallpaper such as making the arcs divide into different rings so that it’s more intricate. I also referred to the code from the assignment to help me with this project. I attached the two inspirations I got from Pinterest below.