// Joseph Zhang
// Section E
// haozhez@andrew.cmue.edu
// Project-05: Wallpaper
function setup() {
createCanvas(600,600);
background('green');
}
// ellipse diam
var diam = 70;
function draw() {
noStroke();
// creates grid system
for (x = 0; x < width/30; x+=1) {
for ( y = 0; y < height/30; y += 1) {
bigCircle(30 + 60 * x, 30 + 60 * y);
smallCircleRect(30 + 60 * x, 30 + 60 * y);
}
}
noLoop();
}
// creates the black portion
function bigCircle(xPos,yPos) {
fill('black');
ellipse(xPos, yPos, diam , diam)
}
// creates the white portion
function smallCircleRect(xPos,yPos) {
fill('white');
rectMode(CENTER);
rect(xPos, yPos, diam / 1.3, diam / 1.3);
ellipse(xPos, yPos, diam - 7, diam - 7);
}
For this project, I pulled a lot of inspiration from the Tartan plaid pattern that’s often associated with Carnegie Mellon. That’s why I went with the grid-like pattern and the black green color scheme.