Sunday, May 31, 2009

frogga waterfall

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

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

int canvasSizex = 200;
int canvasSizey = 700;

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,200, 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++){
    yPositions[i] += int(random(0,2+mouseY/20));
    //yPositions[i] += int(random(0,1));
  }
  
  for(int i=0; i < mouseY; i++){
    rect(xPositions[i] ,yPositions[i] % canvasSizey,5,20);
  }


}

infoinfo

submitted by: sophie.mcdonald

now with slow fade and moving blocks! move the mouse up & down 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: animation

commentscomment

loading loading...

 

sign in to Add a comment: