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);
}
วันอาทิตย์ที่ 7 กันยายน พ.ศ. 2557
L.2 Star
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น