วันอาทิตย์ที่ 30 สิงหาคม พ.ศ. 2558

Lab 2 : My favorite books (animetion)

int wide=0;
int high=0;
int start=50;
void setup() {
  size(350, 450);
}
void draw() {
  draw_wolf();
  frameRate(10);
  wide=(wide+10)%width;

}
void draw_wolf() {
  background(#a19d8c);
  //WHITE_FANG
  fill(#2f4940);
  textSize(80);
  //text-WHITE
  text("WHITE", 40, 75);
  //text-FANG
  text("FANG", 60, 150);
  //JACK_LONDON
  textSize(30);
  //text-JACK LONDON
  text("JACK LONDON", 70, 425);
  //frame
  noStroke();
  //frame-1
  fill(#2f4940);
  rect(40, 170, 270, 225);
  //frame-2
  fill(#a19d8c);
  rect(45, 175, 260, 215);
  //frame-3
  fill(#2f4940);
  rect(50, 180, 250, 205);
  //wolf :  begin at left to right
  fill(#d5cfb7);
  beginShape();
  vertex(50+wide-start, 345);   //01-no move
  //over
  vertex(120+wide-start, 276);  //02
  vertex(214+wide-start, 254);  //03
  vertex(238+wide-start, 230);  //04
  vertex(229+wide-start, 198);  //05
  vertex(245+wide-start, 210);  //06
  vertex(240+wide-start, 197);  //07
  vertex(255+wide-start, 210);  //08
  vertex(289+wide-start, 180);  //09
  //under
  vertex(293+wide-start, 190+high);  //10
  vertex(285+wide-start, 220+high);  //11
  vertex(297+wide-start, 207+high);  //12
  vertex(300+wide-start, 215+high);  //13
  vertex(280+wide-start, 240+high);  //14
  vertex(245+wide-start, 322+high);  //15
  vertex(248+wide-start, 355+high);  //16
  vertex(265+wide-start, 368+high);  //17
  vertex(250+wide-start, 370+high);  //18
  vertex(237+wide-start, 348+high);  //19
  vertex(240+wide-start, 370+high);  //20
  vertex(255+wide-start, 385+high);  //21
  vertex(240+wide-start, 385+high);  //22
  vertex(215+wide-start, 325+high);  //23
  vertex(155+wide-start, 315+high);  //24
  vertex(135+wide-start, 330+high);  //25
  vertex(135+wide-start, 347+high);  //26
  vertex(155+wide-start, 360+high);  //27
  vertex(135+wide-start, 360+high);  //28
  vertex(125+wide-start, 330+high);  //29
  vertex(110+wide-start, 340+high);  //30
  vertex(105+wide-start, 365+high);  //31
  vertex(120+wide-start, 377+high);  //32
  vertex(105+wide-start, 378+high);  //33
  vertex(95+wide-start, 340+high);   //34
  vertex(100+wide-start, 330+high);  //35
  endShape();
}




ไม่มีความคิดเห็น:

แสดงความคิดเห็น