วันเสาร์ที่ 23 สิงหาคม พ.ศ. 2557
Lab1 : dreaw a tree
void setup() {
size(323, 200);
background(#FFFF99);
int center_treeX = 135 ;
int center_treeY = 121.5 ;
fill(#000000);
quad(center_treeX+53, center_treeY+9.5, center_treeX-57, center_treeY+9.5, center_treeX-33, center_treeY+3.5, center_treeX+29, center_treeY+3.5); //black soil
noFill();
fill(#8A5C00);
quad(center_treeX-30, center_treeY-41.5, center_treeX+30, center_treeY-41.5, center_treeX+30, center_treeY+41.5, center_treeX-30, center_treeX+41.5); //brown tree
fill(#A3C2C2);
quad(center_treeX+53, center_treeY+9.5, center_treeX-57, center_treeY+9.5, center_treeX-33, center_treeY+51.5, center_treeX+29, center_treeY+51.5); //blue pots
noFill();
int center_leavesX = 135 ;
int center_leavesY = 121.5 ;
int radius_leaves = 40 ;
fill(#19A319);
noStroke();
ellipse(center_leavesX-35, center_leavesY-31.5, radius_leaves, radius_leaves); //green leaves1
ellipse(center_leavesX-50, center_leavesY-56.5, radius_leaves, radius_leaves); //green leaves2
ellipse(center_leavesX-30, center_leavesY-71.5, radius_leaves, radius_leaves); //green leaves3
ellipse(center_leavesX+18, center_leavesY-76.5, radius_leaves-10, radius_leaves); //green leaves4
ellipse(center_leavesX+50, center_leavesY-46.5, radius_leaves, radius_leaves); //green leaves5
ellipse(center_leavesX+40, center_leavesY-61.5, radius_leaves, radius_leaves); //green leaves6
ellipse(center_leavesX+40, center_leavesY-31.5, radius_leaves-10, radius_leaves); //green leaves7
ellipse(center_leavesX+5, center_leavesY-58.5, radius_leaves+50, radius_leaves+25); //green leaves8
}
ป้ายกำกับ:
Lab1
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น