//Hanna Jang
//Section B
//hannajan@andrew.cmu.edu
//Project 05
var space1=10;
var space2=40;
var space3=30;
var area=80;
var area2=5
var px;
var py;
function setup () {
createCanvas(400, 400);
background(255, 201, 227);
noStroke();
}
function draw() {
for (var y=0; y<5; y++) {
for (var x=0; x<5; x++) {
//plate shadows
px=space1+x*area;
py=space1+y*area;
fill(102, 20, 79);
rect(px, py, space3*2+7, space3*2+7);
//plates
fill(255, 128, 159);
rect(px, py, space3*2, space3*2);
//egg white circle 1
px=space3+x*space2*2;
py=space3+y*space2*2;
fill(255);
ellipse(px, py, space3, space3);
//egg white circle 2
px=space2+5+x*area;
py=space2+5+y*area;
fill(255);
ellipse(px, py, space2+3, space2+3);
//egg white circle 3
px=space3+3+x*area;
py=space3+3+y*area;
fill(255);
ellipse(px, py, space3+2, space3+2);
//yolk shadows
px=space2+5+x*area;
py=space2+5+y*area;
fill(203, 141, 15);
ellipse(px, py, 3+area2*4, 3+area2*4);
//yolk
px=space2+3+x*area;
py=space2+3+y*area;
fill(255, 181, 75);
ellipse(px, py, area2*4, area2*4);
//yolk shine
px=space2+x*area;
py=space2+y*area;
fill(255);
ellipse(px, py, area2, area2);
}
}
}
For this project, I wanted to make patterns with one of my favorite foods: eggs. I first sketched out a basic grid design I wanted to use as plates for the eggs (as seen in the image above). I was also inspired by the theme for this week’s Looking Outwards and wanted to give a 2-D image a more 3-D look. I did this using some simple shadows to also add a 3-D element and am quite happy with the repeated pattern overall.