วันจันทร์ที่ 24 สิงหาคม พ.ศ. 2558

Lab2-book


int moveY;
void setup(){
size(550,700);
}
void draw(){
 book();
}
void book(){
 int posy=50;
  moveY=(moveY+1)%(100);
  fill(#D8BABA);
  rect(0, 0, 549, 699);
  fill(#FFFFFF);
  rect(0, 0, 55, 699);
  textSize(40);
      fill(#000000);
     text("1",15,50);
      textSize(20);
      text("45B",8,660);
  fill(#FF9966);
  rect(60, 5, 485, 450);
//////////////////Body/////////////////
  fill(#000000);
  strokeWeight(4);

  ellipse(300, posy+250-moveY, 240, 250);//face back
  fill(#FFFFFF);
  rect(165, posy+251-moveY, 30, 40);//left ear
  rect(405, posy+251-moveY, 30, 40);//right ear
  ellipse(300, posy+254-moveY, 238, 245);
  fill(#FDFF40);//face front
     ellipse(360, posy+245-moveY, 70, 80);//right eye
     ellipse(240, posy+245-moveY, 70, 80);//left eye
  strokeWeight(2);
  fill(#000000);
   triangle(300, posy+275-moveY, 285,posy+100-moveY, 315, posy+100-moveY);  //crest
  textSize(70);
      fill(#000000);
     text("The",100,530);
      textSize(60);
     text("Ultraman",250,530);
      textSize(40);
     text("Original",380,580);
 
  println("My faverite book is ");
  println ("ultranma");
  println(-moveY);

}

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

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