/* Nina Yoo
Section E
nyoo@andrew.cmu.edu
Project- 05 Wallpaper*/
var head = 30
var eyes = 15
var eye = 30
var space = 50
function setup() {
createCanvas(600, 400);
background(216,117,28);
for (var y = 25; y < height; y+=space) { //y position of wall paper
for (var x = 25; x < width; x+=space) { //x position of wall paper
//outercircle
noStroke();
fill(215,185,119);
ellipse(x, y, head, head);
//2nd circle
noStroke();
fill(0);
ellipse(x,y,head*.5,head*.5); //have to base i off of head variable
//middle
noStroke();
fill(238,184,213);
ellipse(x,y,head*.2,head*.2);
}
}
for (var a = 40; a<width; a+=space){
for (var b = 40; b<height;b +=space){ //offset spacing
//tan overlayering
stroke(200,200,124);
noFill();
ellipse(a,b, eye,eye); // create new variable eye to separate from the other loop
//black center circle
stroke(0);
noFill();
ellipse(a,b,eye*.5,eye*.5);
}
}
}
function draw() {
// draw is not called due to noLoop() in setup()
noLoop()
}
I wanted to play with circles and the colors to mess with someones eyes on a lower scale and it was fun trying to trip myself up while also deciding where to have fill versus not. The spacing took some time to figure out where I wanted the nofill circles to be, but was worth.