> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://bard117s14.sketchpad.cc/sp/pad/view/ro.3kT76nFX7gq/rev.2
 * 
 * authors: 
 *   Rosa S

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



  // This sketch builds on a prior work, "Self Portrait", created by Rosa S
// http://bard117s14.sketchpad.cc/sp/pad/view/ro.AyVP6XW7sufnN-/rev.1
/*Rosa Schwartzburg Class Assignment - Self Portrait II-Dynamic Pictures - 2/18/14*/
//this sketch, which is a self-portrait, explores the four types of dynamic images. This makes it
//very different from the original self-portrait, which was a completely static image.
//Self-Portrait 2 still uses static image in the mouth, face shape, nose, and the shape of the eyes, which remain unchanged no matter what.
//It uses static animation in the varying color of the hair, which, though random, repeats.
//It also uses interactive, dynamic image to control the color of the eyes, which varies between red, green, and blue, 
//based upon mouse location, and uses conditionals to do so.
//The code was not too difficult to draw, although originally I wanted to use a variable, but I couldn't figure out how to do it in Processing.
//Creating the dynamic and interative images was not too difficult, but I had to make sure that I properly integrated these features in the existing 
//code, which was a bit confusing at first.
void setup(){
    size(700, 700);
    frameRate(10);
}
void draw(){
  background (180);
//face//
fill(250,218,194);
ellipse(350,350,500,500);
//eyes//
fill(255);
ellipse(250,300, 100,55);
ellipse(450,300,100,55);
//iris//
//turn iris different colors (red,green, blue)//
if(mouseX < width/2){
  fill(150,0,0);
}
if (mouseX > width/2){
  fill(0,150,0);
}
if(mouseY > height/2){
  fill(0,0,150);
}


ellipse(450,300,50,50);
ellipse(250,300,50,50);
fill(0);
//pupils//
ellipse(450,300,25,25);
ellipse(250,300,25,25);
fill(222,85,85);
//mouth//
ellipse(350,500,200,50);
fill(0);
line(250,500,450,500);
fill(80,34,34);
rect(175,225,125,10);
rect(400,225,125,10);
//bangs(green)//
fill(40+random(-50,150),167+random(-5,15),34+random(-150,50),250);
rect(100,175,100,200);
rect(500,175,100,200);
//bangs(darker green)//
fill(139+random(-50,150),160+random(-5,15),111+random(-5,15),250);
rect(150,100,75,200);
rect(475,100,75,200);
//hair(brown)//
fill(100+random(-5,15),46+random(-50,150),60+random(-5,15),250);
rect(200,100,300,100);
//rest of hair//
fill(100+random(-50,150),46+random(-5,15),60+random(-5,15));
rect(100,300,50,450);
rect(550,300,50,450);
//nose//
fill(0);
line(325,450,375,450);
}