2013年9月15日 星期日

第二周HW

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

void setup()
{
 size(500,500);
 imageMode(CENTER);
 }
void draw() {
 for(int x=0;x<=500;x+=100)
 {
   for(int y=0;y<=500;y+=100)
   {
   fill(255,0,0);
   rect(x,y,100,100);
   
   fill(0,255,0);
   ellipse(x, y, 50, 50);
   
   fill(255ted8,255,255,dist(x,y,mouseX,mouseY));
   triangle(x+30, y+75, x+58, y+20, x+86, y+75);



   }
 }
}









//PImage n=loadImage("http://img.amiami.jp/images/product/review/133/FIG-COL-6195_04.jpg");
color [][] myColor = new color[6][4];////
void setup()
{
  size(500, 500);
  for (int x=0;x<=500;x+=100)
  {
    for (int y=0;y<=500;y+=100)
    {
      myColor[x/100][y/100] = color(random(256), random(256), random(256));
      ////
    }
  }
}
void draw() {
  for (int x=0;x<=500;x+=100)
  {
    for (int y=0;y<=500;y+=100)
    {
      fill(255, 0, 0);
      rect(x, y, 100, 100);

      fill(myColor[x/100][y/100]);////
      ellipse(x, y, 50, 50);

      fill(255, 255, 255, dist(x, y, mouseX, mouseY));
      triangle(x+30, y+75, x+58, y+20, x+86, y+75);
      //image(n, mouseX, mouseY,80,100);
    }
  }
}


沒有留言:

張貼留言