Sunday, May 31, 2009

frogga river 03

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

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

int canvasSizex = 900;
int canvasSizey = 200;

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

for(int k=1900; k > 0; k--){
  xPositions[k] = int(random(0,canvasSizex));
  yPositions[k] = int(random(0,canvasSizey));
}


}

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

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


}

infoinfo

submitted by: sophie.mcdonald

now with slow fade and moving blocks! move the mouse left & right to make less or more blocks, matrix style! /* * by Sophie & Davide, inspired by Ty Lettau, terra04 * http://www.friendsofed.com/fmc/FMCv2/FMC.html */

treeThis sketch has a parent
Tags: moving_blocks

commentscomment

loading loading...

 

sign in to Add a comment: