วันศุกร์ที่ 26 กันยายน พ.ศ. 2557

Bug-Report

Bug 1
     - ตึกในFrameที่3ที่ตั้งอยู่กับที่ เปลี่ยนตำแหน่งทุกครั้งที่วนมาดูใหม่
Why?
     - ค่าในตัวแปล array ที่ชื่อ Locat จะลดเมื่ออยู่ในFrameที่2 (ภาพตึกเคลื่อนที่) แล้วในFrameที่3ใช้ตัวแปลLocatตัวเดียวกัน
How to fix
     - ตั้งตัวแปล array ของตึกขึ้นมาใหม่  เป็นLocat2 เพื่อใช้กำหนดค่าตำแหน่งของตึก

Bug 2
     - รถไฟในFrameสุดท้ายเมื่อวนมาอีกรอบจะเริ่มวิ่งจากจุดที่หยุดรอบที่แล้ว ไม่กลับมาเริ่มใหม่
Why?
     -รถไฟใช้ตัวแปล Tsp(Train speed) ซึ่งเป็นตัวแปล Local และมีค่าเพิ่มขึ้นจากฟังก์ชัน draw_train ที่ใช้ Tsp = Tsp + 1; ในการเพิ่มค่าของตัวแปล แต่ค่าที่เพิ่มแล้วจะไม่กลับมาเท่าเดิม
How to fix
     - กำหนดค่าให้กลับมาที่เดิมโดยตั้งค่า Tsp เป็น 0 เท่าเดิมใน void mousePressed() ทุกครั้งที่กดmouse ค่า Tsp จะกลับมาเท่าเดิม

วันพุธที่ 24 กันยายน พ.ศ. 2557

Graph Aray


Graph Aray

void setup(){
    size(400,300);
    
}
int[]x = {70,120,170,220,270};
int[]y = {120,90,150,100,170};
float total = 0;

void draw(){
    background(142,226,255);
    strokeWeight(5);
    line(30,30,30,252);
    line(30,252,350,252);
    strokeWeight(1);
    draw_graph();
    fill(0);
    text('0',20,270);
    stroke(255,0,0);
    strokeWeight(2);
    line(250,280,270,280);
    text("Average line",280,280);
    average();
    text("average ",320,50);
    text("is",340,70);
    text(total,310,90);
    stroke(0);
    fill(255,0,0);
    rect(50,270,10,10);
    text("Max",70,280);
    fill(0,0,255);
    rect(150,270,10,10);
    text("Min",170,280);
}
void draw_graph(){
  for(int i = 0; i<x.length; i++){
     fill(0);
     text(y[i],x[i],height-(y[i]+60));
     textSize(15);
     if(mousePressed && (mouseButton == LEFT) && mouseX>x[i] && mouseX<x[i]+20){
            y[i] = 250-mouseY ;
     }
     if(y[i]==max(y)){
       fill(255,0,0);
       text(y[i],x[i],height-(y[i]+60));
     }
     else if(y[i]==min(y)){
     fill(0,0,255);
     text(y[i],x[i],height-(y[i]+60));
     }
     else{fill(200);}
     rect(x[i],250,20,-y[i]);
     
  }
}
void average(){
  for(int j = 0; j < y.length; j++){
  total = total +y[j] ;
  }
  total = total/5;
  line(30,height-total,350,height-total);

}

วันพุธที่ 17 กันยายน พ.ศ. 2557

Balloon


void setup(){
 size(400,300);
 frameRate(100);
}
float []y = {200,170,180,190,200};
float []x = {230,300,140,50,375};
int []r = {5,10,20,15,25};
float []R = {255,255,0,100,255};
float []G = {255,0,255,255,100};
float []B = {0,255,255,100,255};
float []speed = {1.25,1.5,2,1.75,2.5};
float Red = 180 ;
float Green = 250 ;
float Blue = 200 ;
void draw(){
  background(Red,Green,Blue);
  Red = Red + 0.1 ;
  if(Red>=255){Red=180;}
  Green = Green + 0.1 ;
  if(Green>=255){Green=250;}
  Blue = Blue + 0.1;
  if(Blue>=255){Blue=200;}
  for(int i = 0; i<y.length;i++){
draw_balloon(x[i],y[i],r[i],R[i],G[i],B[i]);//yellow
  y[i]=y[i] - speed[i];
  if(y[i]<-120){
  y[i] = 350 ; 
  R[i]=random(100,255);
  G[i]=random(100,255);
  B[i]=random(100,255);
  x[i]=random(0,400);
  }
 }
}
void draw_balloon(float x,float y,int r,float R,float G,float B){
    fill(R,G,B);
    ellipse(x,y,2*r+50,2*r+60);
    line(x,y+r+30,x,y+r+100);
    triangle(x-5,y+r+35,x,y+r+30,x+5,y+r+35);
    }




วันอังคารที่ 9 กันยายน พ.ศ. 2557

Quadrant


void setup(){
 size(500,500);
}
  void draw(){
 
  noStroke();
  textSize(25);
  fill(255,0,0);
  rect(0,0,250,250);
  fill(0,255,0);
  rect(250,0,250,250);
  fill(0,0,255);
  rect(0,250,250,250);
  fill(0);
  rect(250,250,250,250);
  fill(255,0,0);
  stroke(0);
  strokeWeight(5);
  line(0,250,500,250);
  line(250,0,250,500);
  if(mouseX>=250&&mouseX<=500&&mouseY>=0&&mouseY<=250){
    text(" Quadrant I ",300,130);
  } 
  fill(0,255,0);
  if(mouseX>=0&&mouseX<=250&&mouseY>=0&&mouseY<=250){
    text(" Quadrant II ",50,130);
  }
  fill(255,255,0);
  if(mouseX>=0&&mouseX<=250&&mouseY>=250&&mouseY<=500){
    text(" Quadrant III ",50,380);
  }
  fill(255);
  if(mouseX>=250&&mouseX<=500&&mouseY>=250&&mouseY<=500){
    text(" Quadrant IV ",300,380);
  }
} 

Bicycle


void setup(){
    size(400,300);
    background(123);
    draw_bicycle(10);
    }
    
void draw_bicycle(int move_left){
    strokeWeight(8);
    ellipse(100-move_left,220,100,100);
    ellipse(300-move_left,220,100,100);
    line(225-move_left,230,195-move_left,250);
    line(190-move_left,250,200-move_left,250);
    strokeWeight(10);
    line(100-move_left,220,135-move_left,115);
    line(135-move_left,130,260-move_left,150);
    line(260-move_left,150,300-move_left,220);
    line(225-move_left,230,300-move_left,220);
    line(225-move_left,230,130-move_left,145);
    line(225-move_left,230,268-move_left,120);
    line(135-move_left,115,100-move_left,105);
    
    fill(0);
    ellipse(260-move_left,120,50,15);
    strokeWeight(15);
    point(100-move_left,105);
    point(135-move_left,115);
    point(100-move_left,220);
    point(300-move_left,220);
    ellipse(225-move_left,230,30,30);
    strokeWeight(2);
    line(225-move_left,210,300-move_left,215);
    line(225-move_left,250,300-move_left,225);
}

วันอาทิตย์ที่ 7 กันยายน พ.ศ. 2557

L.2 Football-field


void setup() 
{
    size (500,660);
    background (0);
    draw_football_fill(150,20,40,20);
    draw_football_fill(200,70,40,340);

}
void draw_football_fill(int filed_color_green,int filed_color_blue,int filed_width,filed_length){    
    stroke(255);
    strokeWeight(4);
    fill(0, filed_color_green, filed_color_blue);//filed color
    rect(13+filed_width,14+filed_length,400,270);//field
    line(215+filed_width, 280+filed_length, 215+filed_width, 15+filed_length);//half-way line
    
    strokeWeight(3);
    rect(13+filed_width,75+filed_length,70,150);//penalty area left
    rect(343+filed_width,75+filed_length,70,150);//penalty area right
    
    rect(13+filed_width,107+filed_length,30,90);//goal
    rect(383+filed_width,107+filed_length,30,90);//goal
    
    int center_radius=70;
    ellipse(215+filed_width,150+filed_length,center_radius,center_radius);
    //centre circle
        
    arc(342+filed_width,152+filed_length,50,50, PI/2,TWO_PI-PI/2);
    arc(85+filed_width,152+filed_length,50,50, -PI/2,PI/2);
    arc(16+filed_width, 16+filed_length, 20, 20, 0, PI/2);
    arc(410+filed_width, 16+filed_length, 20, 20, PI/2, PI);
    arc(410+filed_width, 281+filed_length, 20, 20, PI, TWO_PI-PI/2);
    arc(16+filed_width, 281+filed_length, 20, 20, TWO_PI-PI/2, TWO_PI);
    fill(255);
    ellipse(62+filed_width, 151+filed_length, 5, 5);
    ellipse(362+filed_width, 151+filed_length, 5, 5);
    ellipse(215+filed_width, 151+filed_length, 5, 5);//centre spot
        
    }

L.2 spoon and fork


void setup() {
  size(400, 300);
  background(60,120,60);
  stroke(196);
  fill(196);  
  void draw_spoon(-80,-30);//1
  void draw_fork(-80,-30);//1
  void draw_spoon(20,-30);//2
  void draw_fork(20,-30);//2
  void draw_spoon(120,-30);//3
  void draw_fork(120,-30);//3
  void draw_spoon(220,-30);//4
  void draw_fork(220,-30);//4
  void draw_spoon(220,100);//5
  void draw_fork(220,100);//5
  void draw_spoon(120,100);//6
  void draw_fork(120,100);//6
  void draw_spoon(20,100);//7
  void draw_fork(20,100);//7
  void draw_spoon(-80,100);//8
  void draw_fork(-80,100);//8
  }
  void draw_spoon(int move_x, int move_y){ 
  rect(115+move_x, 70+move_y, 6, 80,10);  
  ellipse(118+move_x, 70+move_y, 30, 40);
  }
  void draw_fork(int move_x, int move_y){
  rect(155+move_x, 50+move_y, 2, 35,10); 
  rect(150+move_x, 50+move_y, 2, 35,10); 
  rect(165+move_x, 50+move_y, 2, 35,10);  
  rect(160+move_x, 50+move_y, 2, 35,10);  
  rect(156+move_x, 80+move_y, 6, 70,10);  
  rect(150+move_x, 80+move_y, 17, 6,10);  
}

L.2 Star


void setup() {
  size(400, 300);
  int background_color_red=10,
      background_color_green=50,
      background_color_blue=100;
  background(background_color_red, background_color_green, background_color_blue);
  darw_star(0,-20,100,100);
  darw_star(50,50,150,150);
  darw_star(100,120,200,200);
  darw_star(150,190,255,255);
  darw_star(200,120,200,200);
  darw_star(250,50,150,150);
  darw_star(300,-20,100,100);
  }
  void darw_star(int location_x, int location_y, int color_red, int color_green)
  {
  noStroke();
  fill(color_red, color_green, 0);
  
  beginShape();
  vertex(47+location_x, 0+location_y);
  vertex(61+location_x, 30+location_y);
  vertex(94+location_x, 35+location_y);
  vertex(70+location_x, 57+location_y);
  vertex(76+location_x, 90+location_y);
  vertex(47+location_x, 75+location_y);
  vertex(18+location_x, 90+location_y);
  vertex(24+location_x, 57+location_y);
  vertex(0+location_x, 35+location_y);
  vertex(33+location_x, 30+location_y);
  endShape(CLOSE);
}

วันพุธที่ 3 กันยายน พ.ศ. 2557

L.2 Turtle


void setup() {
  size(400, 300);
  background(60, 237, 221);

  frameRate(20);
}

int walk_right = 70;
int walk_front = -100;

void draw()  
{
  background(60, 237, 221);
  draw_turtle(walk_right,walk_front );
  draw_turtle(-walk_right,walk_front );
  draw_turtle(0,walk_front );
   walk_right = walk_right + 1;
   if (walk_right > 200) {walk_right = 70;}
   walk_front = walk_front + 3;
   if (walk_front > 290) {walk_front = -100;}
  
  
 
}
void draw_turtle(int walk_right, int walk_front)
{
  fill(173, 255, 47);
  ellipse(165+walk_right, 220-walk_front, 30, 15);
  ellipse(165+walk_right, 260-walk_front, 30, 15);
  ellipse(235+walk_right, 220-walk_front, 30, 15);
  ellipse(235+walk_right, 260-walk_front, 30, 15);
  ellipse(200+walk_right, 285-walk_front, 10, 20);
  ellipse(200+walk_right, 185-walk_front, 40, 40);
  fill(85, 107, 47);
  ellipse(200+walk_right, 240-walk_front, 70, 90);
  line(200+walk_right, 205-walk_front, 200+walk_right, 275-walk_front);
  quad(180+walk_right, 210-walk_front, 196+walk_right, 205-walk_front, 196+walk_right, 220-walk_front, 185+walk_right, 220-walk_front);
  quad(180+walk_right, 230-walk_front, 196+walk_right, 235-walk_front, 196+walk_right, 220-walk_front, 185+walk_right, 220-walk_front);
  quad(180+walk_right, 240-walk_front, 196+walk_right, 235-walk_front, 196+walk_right, 250-walk_front, 185+walk_right, 250-walk_front);
  quad(180+walk_right, 260-walk_front, 196+walk_right, 265-walk_front, 196+walk_right, 250-walk_front, 185+walk_right, 250-walk_front);
  quad(180+walk_right, 275-walk_front, 196+walk_right, 280-walk_front, 196+walk_right, 265-walk_front, 185+walk_right, 265-walk_front);
  quad(220+walk_right, 210-walk_front, 204+walk_right, 205-walk_front, 204+walk_right, 220-walk_front, 215+walk_right, 220-walk_front);
  quad(220+walk_right, 230-walk_front, 204+walk_right, 235-walk_front, 204+walk_right, 220-walk_front, 215+walk_right, 220-walk_front);
  quad(220+walk_right, 240-walk_front, 204+walk_right, 235-walk_front, 204+walk_right, 250-walk_front, 215+walk_right, 250-walk_front);
  quad(220+walk_right, 260-walk_front, 204+walk_right, 265-walk_front, 204+walk_right, 250-walk_front, 215+walk_right, 250-walk_front);
  quad(220+walk_right, 275-walk_front, 204+walk_right, 280-walk_front, 204+walk_right, 265-walk_front, 215+walk_right, 265-walk_front);
  ellipse(185+walk_right, 179-walk_front, 10, 10);
  ellipse(215+walk_right, 179-walk_front, 10, 10);
} 

วันอังคารที่ 2 กันยายน พ.ศ. 2557

L.2 Subject


void setup() 
{
  size(400, 300);
  background(0);
  frameRate(30);
 
draw_mercury(10);
draw_venus(10);
draw_earth(10);
draw_mars(10);
draw_jupiter(10);
draw_saturn(10);
noStroke();
draw_uranus(10);
draw_neptune(10);
draw_sun(200,150,0);
}
void draw_sun(int sun_color_red,int sun_color_green,int sun_color_blue) 
{   
  fill(sun_color_red, sun_color_green, sun_color_blue);//sun color
  ellipse(-210, 150, 600, 600);//sun
}
void draw_mercury(int move_mercury_X)  
{
  fill(250,250,0);//mercury color
  ellipse(120+move_mercury_X, 150, 10, 10);//mercury
} 
void draw_venus(int move_venus_X)
{
  fill(179,150,0);//venus color
  ellipse(175+move_venus_X, 150, 30, 30);//venus
}
void draw_earth(int move_earth_X)
{
  fill(0,118,174);//earth color
  ellipse(240+move_earth_X, 150, 35, 35);//earth 
} 
void draw_mars(int move_mars_X)
{
  fill(94,47,0);//mars color
  ellipse(300+move_mars_X, 150, 25, 25);//mars
}
void draw_jupiter(int move_jupiter_X)
{
  fill(160,115,90);//jupiter color
  ellipse(390+move_jupiter_X, 150, 120, 120);//jupiter
}
void draw_saturn(int move_saturn_X)
{
  fill(190,140,50);//saturn color
  ellipse(550+move_saturn_X, 150, 100, 100);//saturn
  stroke(153,102,0);
  strokeWeight(10);
  line(450+move_saturn_X, 200, 650+move_saturn_X, 100);//saturn ring
}
void draw_uranus(int move_uranus_X)
{
  fill(204);//uranus color
  ellipse(680+move_uranus_X, 150, 50, 50);//uranus
}
void draw_neptune(int move_neptune_X)
{
  fill(51,102,153);//neptune color
  ellipse(770+move_neptune_X, 150, 50, 50);//neptune
}

L.2 Tree


void setup()
{
  size(323, 200);
  stroke(255);   
  draw_tree(150,0);
  draw_tree(-160,0);
  draw_tree(-60,0);
  draw_tree(50,0);
  draw_tree(-10,-10);
  draw_tree(100,-10);
  draw_tree(-110,-10);
}

void draw_tree(int location_x,int location_y)
{
  noStroke();

  fill(204, 102, 0);
  rect(155+location_x, 120+location_y, 18, 80);
  triangle(152+location_x, 215+location_y, 164+location_x, 100+location_y, 176+location_x, 215+location_y);
  triangle(152+location_x, 151+location_y, 164+location_x, 200+location_y, 176+location_x, 151+location_y);

  fill(0, 95, 0);
  ellipse(135+location_x, 65+location_y, 30, 30);
  ellipse(165+location_x, 132+location_y, 30, 30);
  ellipse(195+location_x, 65+location_y, 30, 30);
  ellipse(120+location_x, 120+location_y, 30, 30);
  ellipse(150+location_x, 130+location_y, 30, 30);
  ellipse(135+location_x, 132+location_y, 30, 30);
  ellipse(145+location_x, 138+location_y, 30, 30);
  ellipse(185+location_x, 138+location_y, 30, 30);
  ellipse(155+location_x, 136+location_y, 30, 30);
  ellipse(175+location_x, 136+location_y, 30, 30);

  fill(0, 135, 0);
  ellipse(210+location_x, 120+location_y, 30, 30);
  ellipse(150+location_x, 100+location_y, 30, 30);
  ellipse(220+location_x, 105+location_y, 30, 30);
  ellipse(150+location_x, 55+location_y, 30, 30);

  fill(0, 125, 0);
  ellipse(180+location_x, 100+location_y, 30, 30);
  ellipse(165+location_x, 110+location_y, 30, 30);
  ellipse(135+location_x, 110+location_y, 30, 30);
  ellipse(180+location_x, 55+location_y, 30, 30);
  ellipse(115+location_x, 105+location_y, 30, 30);
  ellipse(195+location_x, 132+location_y, 30, 30);

  fill(0, 145, 0);
  ellipse(195+location_x, 110+location_y, 30, 30);
  ellipse(165+location_x, 85+location_y, 30, 30);
  ellipse(135+location_x, 75+location_y, 30, 30);
  ellipse(165+location_x, 50+location_y, 30, 30);

  fill(0, 155, 0);
  ellipse(195+location_x, 75+location_y, 30, 30);
  ellipse(120+location_x, 85+location_y, 30, 30);
  ellipse(210+location_x, 85+location_y, 30, 30);
  ellipse(155+location_x, 70+location_y, 30, 30);
  ellipse(180+location_x, 130+location_y, 30, 30);

  fill(0, 165, 0);
  ellipse(175+location_x, 70+location_y, 30, 30);
  ellipse(165+location_x, 65+location_y, 30, 30);
  ellipse(135+location_x, 85+location_y, 30, 30);
  ellipse(195+location_x, 85+location_y, 30, 30);

}

วันจันทร์ที่ 1 กันยายน พ.ศ. 2557

L.? Subject


void setup() 
{
  size(400, 300);
  frameRate(30);

}
float sun_color_red = 200;
float sun_color_green = 150;
float sun_color_blue = 0;

float move_mercury_X = 0;
float move_venus_X = 0;
float move_earth_X =0;
float move_mars_X = 0;
float move_jupiter_X = 0;
float move_saturn_X = 0;
float move_uranus_X = 0;
float move_neptune_X = 0;


void draw() 
{   
  sun_color_red = sun_color_red + 1;
  if (sun_color_red > 255) {sun_color_red = 200; }
  sun_color_green = sun_color_green + 1;
  if (sun_color_green > 205) {sun_color_green = 150; }
  sun_color_blue = sun_color_blue +10;
  if (sun_color_blue < 20) {sun_color_blue = 0; }
  move_mercury_X = move_mercury_X - 0.2;
  if (move_mercury_X < -120) {move_mercury_X = 0;}
  move_venus_X = move_venus_X - 0.35;
  if (move_venus_X < -210) {move_venus_X = 0;}
  move_earth_X = move_earth_X - 0.54;
  if (move_earth_X < -324) {move_earth_X = 0;}
  move_mars_X = move_mars_X - 0.7;
  if (move_mars_X < -420) {move_mars_X = 0;}
  move_jupiter_X = move_jupiter_X - 0.95;
  if (move_jupiter_X < -570) {move_jupiter_X = 0;}
  move_saturn_X = move_saturn_X - 1.3;
  if (move_saturn_X < -780) {move_saturn_X = 0;}
  move_uranus_X = move_uranus_X -1.6;
  if (move_uranus_X < -960) {move_uranus_X = 0;}
  move_neptune_X = move_neptune_X -1.8;
  if (move_neptune_X < -1080) {move_neptune_X = 0;}
  background(0);
  fill(51,102,153);//neptune color
  ellipse(770+move_neptune_X, 150, 50, 50);//neptune
  
  fill(204);//uranus color
  ellipse(680+move_uranus_X, 150, 50, 50);//uranus
  
  fill(190,140,50);//saturn color
  ellipse(550+move_saturn_X, 150, 100, 100);//saturn
  stroke(153,102,0);
  strokeWeight(10);
  line(450+move_saturn_X, 200, 650+move_saturn_X, 100);//saturn ring
  
  noStroke();
  int jupiter_color_red=160,jupiter_color_green=115,jupiter_color_blue=90;
  fill(jupiter_color_red,jupiter_color_green,jupiter_color_blue);//jupiter color
  ellipse(390+move_jupiter_X, 150, 120, 120);//jupiter

  int mars_color_red=94,mars_color_green=47,mars_color_blue=0;
  fill(mars_color_red,mars_color_green,mars_color_blue);//mars color
  ellipse(300+move_mars_X, 150, 25, 25);//mars
  
  int earth_color_red=0,earth_color_green=118,earth_color_blue=174;
  fill(earth_color_red,earth_color_green,earth_color_blue);//earth color
  ellipse(240+move_earth_X, 150, 35, 35);//earth
  
  int venus_color_red=179,venus_color_green=150,venus_color_blue=0;
  fill(venus_color_red,venus_color_green,venus_color_blue);//venus color
  ellipse(175+move_venus_X, 150, 30, 30);//venus
   
  int mercury_color_red=250,mercury_color_green=250,mercury_color_blue=0;
  fill(mercury_color_red,mercury_color_green,mercury_color_blue);//mercury color
  ellipse(120+move_mercury_X, 150, 10, 10);//mercury
  
  fill(sun_color_red, sun_color_green, sun_color_blue);//sun color
  ellipse(-210, 150, 600, 600);//sun
}

L.? Pencil


void setup() 

{

  size(400, 300); 
       
  frameRate(30);

}

float x = -50;
float y = 50;

void draw() 

{ 

  background(0); 

  x = x + 1; 
  if (x > 50) { x = -50; } 
  y = y - 1;
  if (y < -50) { y = 50; }
  size(400, 300);
  background(200);
  

  fill(0,200,0);
  quad(185+x, 90+y, 215+x, 100+y, 190+x, 190+y, 160+x, 180+y);
  fill(255,190,141);
  triangle(160+x,180+y,167+x,210+y,190+x,190+y);
  fill(0);
  triangle(163+x,195+y,167+x,210+y,179+x,200+y);
  arc(203.5+x, 85+y, 31, 31, TWO_PI-PI/1.1, TWO_PI+PI/9);
  fill(100);
  quad(188+x, 80+y, 218+x, 90+y, 215+x, 100+y, 185+x, 90+y);
  fill(200,0,0);
  quad(185+x, 90+y, 195+x, 94+y, 170+x, 184+y, 160+x, 180+y);
  fill(0,0,200);
  quad(205+x, 97+y, 215+x, 100+y, 190+x, 190+y, 180+x, 187+y);
  strokeWeight(2);
  line(167+x,210+y,117,260);
}

L.2 Pencil


void setup() {
  size(400, 300);
  background(255);
  draw_pencil(100,50);
  }
  void draw_pencil(int move_pencil_x,int move_pencil_y)
  {
  fill(0,200,0);
  quad(185+move_pencil_x, 90+move_pencil_y, 215+move_pencil_x, 100+move_pencil_y, 190+move_pencil_x, 190+move_pencil_y, 160+move_pencil_x, 180+move_pencil_y);
  fill(255,190,141);
  triangle(160+move_pencil_x,180+move_pencil_y,167+move_pencil_x,210+move_pencil_y,190+move_pencil_x,190+move_pencil_y);
  fill(0);
  triangle(163+move_pencil_x,195+move_pencil_y,167+move_pencil_x,210+move_pencil_y,179+move_pencil_x,200+move_pencil_y);
  arc(203.5+move_pencil_x, 85+move_pencil_y, 31, 31, TWO_PI-PI/1.1, TWO_PI+PI/9);
  fill(100);
  quad(188+move_pencil_x, 80+move_pencil_y, 218+move_pencil_x, 90+move_pencil_y, 215+move_pencil_x, 100+move_pencil_y, 185+move_pencil_x, 90+move_pencil_y);
  fill(200,0,0);
  quad(185+move_pencil_x, 90+move_pencil_y, 195+move_pencil_x, 94+move_pencil_y, 170+move_pencil_x, 184+move_pencil_y, 160+move_pencil_x, 180+move_pencil_y);
  fill(0,0,200);
  quad(205+move_pencil_x, 97+move_pencil_y, 215+move_pencil_x, 100+move_pencil_y, 190+move_pencil_x, 190+move_pencil_y, 180+move_pencil_x, 187+move_pencil_y);
}