Thursday, June 04, 2009

frogga river 02 - sub square

/*
 *  by Sophie & Davide, inspired by Ty Lettau, terra04
 * http://www.friendsofed.com/fmc/FMCv2/FMC.html
 */

int[] xPositions = new int[800];
int[] yPositions = new int[800];

int canvasSizex = 800;
int canvasSizey = 800;

void setup(){
  size(canvasSizex,canvasSizey);

for(int i=0; i < 800; i++){
  xPositions[i] = int(random(0,canvasSizex));
  yPositions[i] = int(random(0,canvasSizey));
}


}

void draw(){
  fill(0,5);
  rect(0,0,canvasSizex,canvasSizey);
  
   fill(0,255,0, 5);
  //rect(34, 45, 20, 5);

 // for(int i=0; i < mouseX; i++){
 //   rect(int(random(0,canvasSizex)), int(random(0,canvasSizey)), 20, 5);
 // }
  
  for(int i=0; i < mouseX; i++){
    rect(xPositions[i],yPositions[i],20,5);
  }
}

infoinfo

submitted by: subflux

move your mouse left to right to change the number of blocks. now with slow fade! /* * by Sophie & Davide, inspired by Ty Lettau, terra04 * http://www.friendsofed.com/fmc/FMCv2/FMC.html */

treeThis sketch has a parent
Tags: moving_blocks, square

commentscomment

loading loading...

 

sign in to Add a comment: