Author Archive

Tims Expression Code

float e1=190;
float e2=190;

void setup() {
size(400, 400);

background(255, 255, 255);
}

void draw() {

//hair
fill(220, 255, 0);
ellipse(200,180,260,320);

//ears
fill(220, 202, 153);
ellipse(90, 190, 50, 50);
ellipse(315, 195, 50, 50);

//head
fill(220, 202, 153);
ellipse(202,225,250,325);

//eyes
fill(225);
ellipse(150, 180, 30, 35);
ellipse(250, 180, 30, 35);

fill(0);
ellipse(150, 180, 15, e1);
ellipse(250, 180, e2, 15);

//mouth
fill(255, 0, 0);
noStroke();
ellipse(width/2, 300, width/5, 20);
ellipse(width/2, 308, width/7, 20);

fill(235, 210, 153);
rect(190, 190, 20, 50);

fill(235, 210, 153);
ellipse(190, 223, 20, 35);
ellipse(211, 222, 20, 35);

fill(235, 210, 153);
ellipse(200, 190, 20, 35);

if (mousePressed){
// this code is only accessed if I click the mouse
//EYEBROWS
// generate eyebrow y coordinates
// assign random y coord between 160-200
e1 = random(5, 15);
e2 = random(5, 15);
}

}

'+
1
'+
2 - 3
4 - 5
6 - 7
8 - 9
10 - 11
12 - 13
13 - 14
[x]