> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://bard117f12.sketchpad.cc/sp/pad/view/ro.HutKTo6KM2W/rev.2
 * 
 * authors: 
 *   Robbie von Kampen

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





void setup(){
  size(600, 600);
  smooth();
  frameRate(100);
 

}
void draw(){
  
   background(mouseX, mouseY, 255);
  
  //grass
  fill(0, 155, 0);
  rect(0, 540, 600, 50);
  
  //head
  strokeWeight(5);
  fill(255, 200, 200);
  ellipse(300, 100, 110, 140);
  
  //mouth
  arc(300, 128, 40, 40, 0, PI);
  line(280, 128, 320, 128);

  if (mouseY < height/2){
    line(300, 250, 400, 190);
    ellipse(400, 190, 20, 30);
  } 
  
  if (mouseY > height/2){
    line(300, 250, 400, 220);
    ellipse(400, 220, 20, 30);
  }
    
  //left arm
  line(300, 250, 200, 220);
  
  //left hand
  ellipse(200, 220, 20, 30);
 
  //body
  line(300, 170, 300, 370);
  
  //legs
  line(300, 370, 360, 540);
  line(300, 370, 240, 540);
  
   //eyes
  fill(255, 255, 255);
  strokeWeight(2);
  ellipse(280, 80, 22, 15);
  ellipse(320, 80, 22, 15);
  
   //nose
  strokeWeight(2);
  fill(255, 200, 200);
  arc(300, 106, 20, 20, 0, PI);
  
  //pupils
  if (mouseX < width/2){
  fill(139, 125, 107);
  ellipse(275, 80, 10, 10);
  ellipse(315, 80, 10, 10);
  } else if (mouseX > width/2){
    fill(139, 125, 107);
  ellipse(285, 80, 10, 10);
  ellipse(325, 80, 10, 10);
  } 
  
}