2012年12月7日 星期五

B10034040_李綠珊_聖誕樹


int p =0;
int q =100;

void setup(){
  size(300, 300);
  background(173, 208, 227);
  smooth();
}

void draw(){
  strokeWeight(2);
  stroke(255);
  for(int a=0; a<=q; a = a+10){
    line(p, a, 100-a, q);
    line(q, q+a, 200-a, 200);
    line(200, 200+a, 300-a, 300);
    line(p, a+100, 200-a, 300);
    line(a, 300, q, 200+a);
    line(a, 200, q, 100+a);
    line(p, a/2, a/2, p);
    strokeWeight(1/2);   
  }
  
  noFill();
  smooth();
  strokeWeight(1/2);
  stroke(250);
  for(int b=100; b<=300; b = b+20){
    arc(200, 300, 200, b, PI+HALF_PI, TWO_PI);
  }

  fill(255);
  textSize(20);
  textAlign(RIGHT);
  text("MERRY", 195, 235);
  textAlign(RIGHT);
  text("CHRISTMAS", 195, 255);
  
  fill(11, 81, 118);
  textSize(20);
  textAlign(RIGHT);
  text("MERRY", 195, 230);
  textAlign(RIGHT);
  text("CHRISTMAS", 195, 250);  
}
    



沒有留言:

張貼留言