วันอาทิตย์ที่ 22 กันยายน พ.ศ. 2556

OX-Table



void setup () {
  size (500, 500);
}
void draw () {
  drawt();
  drawOX();
}
void drawt() {
  stroke (0, 255, 0);
  fill(255, 0, 102);
  int i = 0;
  int [][] a = {
    {
      0, width/3, (width/3)*2, (width/3)*2, 0
    }
    , {
      0, height/3, (height/3)*2, 0, (width/3)*2
    }
  };
  rect(0, 0, width, height);
  strokeWeight (7);
  while (i<a[0].length) {
    rect(a[0][i], a[1][i], width/3, height/3);
    i=i+1;
  }
}
void drawOX() {
  stroke (255);
  strokeWeight(10);
  int Y=(width/3);
  int y=(width/3)/2;
  int x=(width/3)*2;
  int i=0;
  int I=0;
  int n=3;
  int N=2;
  while (i<n) {
    ellipse((width/3)/2, y, 100, 100);
    y = y+(height/3);
    i=i+1;
  }
  line (370, 470, 470, 370);
  line (470, 470, 370, 370);
  line (200, 300, 300, 200);
  line (300, 300, 200, 200);
}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น