Trippy Loop Pattern

Code:

int f;
float x, y, z;

void setup() {
 size(800 , 800, P3D);
 smooth();
 frameRate(60);
 x=height/2;
 y=width/2;
 z=0;
}

void draw() {
 for(int i = 0; i < (width * height); i ++) {
 set(i / height, i % height, 
 i * i / (f + 1)
 );
 }
 f++;
 //loadPixels();
 
 saveFrame(); 
 translate(x, y, z);
 rectMode(CENTER);
 z++;
 
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s