# Joanne Lee – Project 05

``````// Joanne Lee
// Section C
// joannele@andrew.cmu.edu
// Project-05

function setup() {
createCanvas(500,600);
background (135,206,236);
noLoop();
}

function draw() {
var x = 0;
var y = 0;
var shiftX = width / 5;
var shiftY = height / 4;

// diamond repeating background (creating this using repeating X shapes)
for (var a = 0; a < 4; a++) { // rows
for (var b = 0; b < 5; b++) { // columns
stroke(243,250,253);
strokeWeight(3);
line(x, y, x + shiftX, y + shiftY);
line(x + shiftX, y, x, y + shiftY);
x += shiftX;
}
y += shiftY;
x = 0; // reset x
}

// variables for ryan's face
var face = 50;
var earSize = 15;
var eyeSize = 2;
var noseSize = 5;
var stacheSize = 10;
x = 0;
y = shiftY * 0.5;

// rybear in every other diamond, every other row
for (var c = 0; c < 4; c++) { // rows
for (var d = 0; d < 3; d++) { // columns
// ears
stroke(0);
strokeWeight(2.5);
fill(223,155,58);
ellipse(x - 16, y - 17, earSize, 0.85*earSize); // left
ellipse(x + 16, y - 17, earSize, 0.85*earSize); // right

// face
ellipse(x, y, face, 0.85*face);

// eyebrows
line(x + 6, y - 8, x + 14, y - 8); // left
line(x - 14, y - 8, x - 6, y - 8); // right

// eyes
fill(0);
ellipse(x - 9.1, y - 2, eyeSize, eyeSize); // left
ellipse(x + 9.9, y - 2, eyeSize, eyeSize); // right

// nose
ellipse(x, y + 4, noseSize, noseSize);

// mustache
strokeWeight(0);
fill(255);
ellipse(x - 4.5, y + 8, stacheSize, 0.75 * stacheSize); // left
ellipse(x + 4.5, y + 8, stacheSize, 0.75 * stacheSize); // right

x += 2 * shiftX; // in order to put in every other diamond
}

y += shiftY; // put ryan in every other row

// start ryan at different spots for different rows

if (c % 2 == 0) {
x = shiftX;
}

else if (c % 2 == 1) {
x = 0;
}
}
}``````

For this week’s project, I revisited my favorite cartoon character / emoji. I created a repeating diamond background pattern and placed ryan in every other column / row. While creating this wallpaper, I had phone wallpapers in mind and tried to create a simple look because it may look cluttered with phone apps on the screen as well.