2013年9月15日 星期日

week02 課堂

程式碼如下(1):

void setup(){
  size(600,400);
 }
 void draw()
{
 for(int x=0;x<=600;x+=100)
    for(int y =0;y<=400;y+=100)
    {
      {
         rect(x,y,100,100);
      }
    }
}


(2)


  void setup(){
  size(600,400);
 }
 void draw()
{
 for(int x=0;x<=600;x+=100)
    for(int y =0;y<=400;y+=100)
    {
      {
         stroke(255,0,0);
         rect(x,y,100,100);
      }
    }
}
(3)

void setup(){
  size(600,400);
 }
 void draw()
{
 for(int x=0;x<=600;x+=100)
    for(int y =0;y<=400;y+=100)
    {
      {
        fill(255,255,255);
         stroke(255,0, 0);
         rect(x,y,100,100);
         fill(200,200,255);
         ellipse(x+100,y+100, 125, 125);
         noFill();
         triangle(x, y, x-30, y+50,x+30 ,y+50);
      }
    }
}
(4)

沒有留言:

張貼留言