2012年12月6日 星期四
B10010111_賴瑋淳_聖誕樹
size (300, 450);
background(207, 229, 218);
for (int i = 1; i < 3000; i = i+1) { //背景
stroke(242, 165, 165, 3);
line(0, 350+i, 350, -120);
}
for (int i = 2; i < 70; i = i+1) { //樹幹
stroke(44, 109, 104);
line(135, 238+i, 165, 238+i);
}
for (int i = 10; i < 30; i = i+1) { //盆栽
stroke(27, 76, 72);
line(115-9+i, 280+i, 185+9-i, 280+i);
}
for (int i = 2; i < 100; i = i+1) { //下面三角形
stroke(97, 201, 192);
line(150, 100, 200-i, 240);
}
for (int i = 1; i < 60; i = i+1) { //上面三角形
stroke(151, 230, 223);
line(150, 90, 180-i, 160);
}
smooth(); //圓
ellipse(150, 90, 15, 15);
for (int i = 2; i < 300; i = i+1) { //背景
stroke(197, 215, 150, 30);
line(0, 0+i, 420, 0);
stroke(241, 216, 189, 40);
line(0, 100+i, 450, 480);
}
textSize(20); //文字
fill(0, 102, 153, 70);
text("Merry", 125, 340);
fill(0, 115, 173, 99);
text("Christmas", 105, 370);
for (int i = 20; i <800 ; i = i+30) { //雪
smooth(); //圓
ellipse(280, i-50, 3, 3);
smooth(); //圓
ellipse(280, i-50+5, 3, 3);
smooth(); //圓
ellipse(20, i-50, 3, 3);
smooth(); //圓
ellipse(20, i-50+5, 3, 3);
smooth(); //圓
ellipse(i-50, 20, 3, 3);
smooth(); //圓
ellipse(i-50+5, 20, 3, 3);
smooth(); //圓
ellipse(i-50, 430, 3, 3);
smooth(); //圓
ellipse(i-50+5, 430, 3, 3);
}
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言