24 สิงหาคม 2558
Lab1 Doraemon Book(Move)
void setup() {
int X = 0;
int Y = 0;
size(500, 500);
background(#F6B0D8);
strokeJoin(ROUND);
//----- front page -----//
strokeWeight(2);
fill(#323C5D);
rect(X+100,Y+100,270,340);
//----- behind doraemon background -----//
noStroke();
fill(#FCE314);
rect(X+125,Y+220,220,205);
//----- name book background -----//
fill(255);
rect(X+125,Y+130,220,50);
//----- name book -----//
fill(0);
textSize(35);
text("DORAEMON", X+133, Y+167);
//----- book page -----//
strokeWeight(2);
stroke(0);
fill(255);
quad(X+100,Y+100,X+130,Y+80,X+400,Y+80,X+370,Y+100);
quad(X+370,Y+100,X+400,Y+80,X+400,Y+420,X+370,Y+440);
strokeWeight(1);
line(X+106,Y+96,X+376,Y+96);
line(X+112,Y+92,X+382,Y+92);
line(X+118,Y+88,X+388,Y+88);
line(X+124,Y+84,X+394,Y+84);
line(X+376,Y+96,X+376,Y+436);
line(X+382,Y+92,X+382,Y+432);
line(X+388,Y+88,X+388,Y+428);
line(X+394,Y+84,X+394,Y+424);
//----- Doraemon -----//
strokeWeight(3);
stroke(#325D87);
//----- face -----//
fill(#4F81BC);
ellipse(X+235,Y+320,200,175);
fill(255);
ellipse(X+235,Y+334,140,125);
//----- eyes -----//
fill(255);
ellipse(X+215,Y+274,37,50);
ellipse(X+255,Y+274,37,50);
fill(#325D87);
ellipse(X+220,Y+279,8,8);
strokeWeight(4);
arc(X+248,Y+281,6,6,PI,TWO_PI);
strokeWeight(3);
//----- nose -----//
fill(#FE0000);
ellipse(X+235,Y+301,20,20);
//----- mounth -----//
noFill();
arc(X+235,Y+350,100,50,0,PI);
line(X+235,Y+312,X+235,Y+375);
//----- Whiskers -----//
line(X+220,Y+320,X+177,Y+315);
line(X+220,Y+325,X+175,Y+325);
line(X+220,Y+330,X+177,Y+335);
line(X+250,Y+320,X+293,Y+315);
line(X+250,Y+325,X+295,Y+325);
line(X+250,Y+330,X+293,Y+335);
//----- collar -----//
fill(#FD0000);
rect(X+185,Y+395,100,13);
//----- bell -----//
fill(#FCBE0C);
ellipse(X+235,Y+394,20,20);
//----- hands -----//
fill(255);
ellipse(X+180,Y+395,30,28);
ellipse(X+290,Y+395,30,28);
stroke(0);
strokeWeight(1);
line(0,250,500,250);
line(250,0,250,500);
}
ป้ายกำกับ:
Lab1
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น