We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Tiler
Page Index Toggle Pages: 1
Tiler (Read 468 times)
Tiler
Dec 15th, 2009, 10:57am
 
http://www.openprocessing.org/visuals/?visualID=6560

...
http://www.openprocessing.org/visuals/applets/visualb2597ef190d25cae08e6f4f2d301...




//December 15th 2009
//Tiler v.1
//Owaun Scantlebury


void setup(){
 size(300,300,P2D);
 smooth();  

 k = width*height;  
}
int p,k,ll;

void draw(){
 background(255);
 for( int o=0;o<width*height;o++){
   p+=mouseX;
   k-=mouseX;

   //p+=ll; //uncomment to save pics
   // k-=ll; //uncomment to save pics  
   
   if (p>width*height-1){
     p=0;  
   }

   if (p<1){
     k=width*height;  
   }
   int _x= (int)p/width;
   int _x1= (int)k/width;
   int _y = p-(_x*width);
   int _y1 = k-(_x1*width);
   point(_x,_y);  
   point(_y,_x);  
   point(_x1,_y1);  
   point(_y1,_x1);  
 }
 
 
//  ll++;  //uncomment to save pics
//   pic++;
//  save("tile-"+str(pic)+".png");  
//  if (ll>999){
//   exit();  
//  }
}

// int pic;
//void mousePressed(){
// pic++;
//save("tile-"+str(pic)+".png");  
//  
//}

Page Index Toggle Pages: 1