/*
Hyejo Seo
Section A
hyejos@andrew.cmu.edu
Project 5 - Wallpaper
*/
function setup() {
createCanvas(600,600);
background(255, 203, 215);
var w = 150;
var h = 120;
var oy = 60;
var ox = 75;
// background orange lines
noFill();
stroke(255, 178, 15);
strokeWeight(2);
for (var l = 0; l <= width; l+=5){
line(l, 0, l, height);
}
//smiley FACES
fill(255, 255, 27);
stroke(0);
strokeWeight(5);
for (var y = 0; y < 7; y++) {
for (var x = 0; x < 5; x++) {
if(y % 2 == 0 & x % 2 == 0){
var yy = oy + y * h;
var xx = ox + x * w;
ellipse(xx, yy, 80, 80);
}
}
}
for (var y = 0; y < 7; y++){
for(var x = 0; x < 5; x++) {
if(y % 2 == 1 & x % 2 == 1){
var yy = oy + y * h;
var xx = ox + x * w;
ellipse(xx, yy, 80, 80);
}
}
}
// eyes
fill(0);
noStroke();
for (var y = 0; y < 7; y++) {
for (var x = 0; x < 5; x++) {
if(y % 2 == 0 & x % 2 == 0){
var yy = oy + y * h;
var xx = ox + x * w;
ellipse(xx - 13, yy - 10, 10, 20);
ellipse(xx + 13, yy - 10, 10, 20);
}
}
}
for (var y = 0; y < 7; y++){
for(var x = 0; x < 5; x++) {
if(y % 2 == 1 & x % 2 == 1){
var yy = oy + y * h;
var xx = ox + x * w;
ellipse(xx - 13, yy - 10, 10, 20);
ellipse(xx + 13, yy - 10, 10, 20);
}
}
}
//mouth
noFill();
stroke(0);
strokeWeight(5);
for (var y = 0; y < 7; y++) {
for (var x = 0; x < 5; x++) {
if(y % 2 == 0 & x % 2 == 0){
var yy = oy + y * h;
var xx = ox + x * w;
arc(xx, yy + 8, 50, 35, 0, PI);
}
}
}
for (var y = 0; y < 7; y++){
for(var x = 0; x < 5; x++) {
if(y % 2 == 1 & x % 2 == 1){
var yy = oy + y * h;
var xx = ox + x * w;
arc(xx, yy + 8, 50, 35, 0, PI);
}
}
}
//diamonds
fill(0);
noStroke(0);
for (var x = 225; x < width; x += 300) {
for(var y = 30; y < height; y += 240){
quad(x, y, x + 15, y + 25, x, y + 50, x - 15, y +25);
}
}
for (var x = 75; x < width; x += 300) {
for(var y = 155; y < height; y += 240){
quad(x, y, x + 15, y + 25, x, y + 50, x - 15, y +25);
}
}
noLoop();
}
function draw() {
}
Initially, I was inspired by the Golf Wang Smiley Face Sweater. I added more elements such as the orange lines and diamonds to make it more interesting as a wallpaper. I have always wanted to create something with smiley faces even for my previous projects, and, this time, I was able to do it. I had fun creating this wallpaper.