hi subpixel, zooming infinite i mean creating the ilusion that the camare is moving forward. I mean rotozom because if you add a little rotationg you can create spiral structure, that also looks infinite. I think there is some feedback here, because the position of each sphere is defining the position of the next . I was thinking maybe this is the simple example of how simple iteration can create spiral and complex structures .
Ive made that example in pd, im gonna upload a picture of the patch.
I also made a better version , here it is:
Code:
import processing.opengl.*;
Square[] squares = new Square[11];
void setup(){
size(500,500, OPENGL);
for(int i=0; i<squares.length;i++){
squares[i] = new Square( 10*i );
}
rectMode(CENTER);
noStroke();
}
void draw(){
background(0);
translate( 340, 340 , -300 );
for(int i=0; i<squares.length;i++){
squares[i].simulate();
squares[i].draw();
}
}
class Square {
float myCenter;
float mySize;
float valor;
float aumenta;
color myColor;
Square(float startCenter){
myCenter = startCenter;
valor = startCenter * 1.3;
aumenta = 0;
updateSize();
newColor();
}
void draw(){
aumenta = aumenta + 0.001;
pushMatrix( );
fill( myColor );
translate( 0, 0 , myCenter * 14 );
box(40);
hi popMatrix( );
}
void simulate(){
myCenter = myCenter + 0.1;
if(myCenter * 1 >= 100 ){
myCenter = -10;
newColor();
}
updateSize();
}
void updateSize(){
mySize = 20-dist(myCenter, myCenter, width/2, height/2)/10;
}
void newColor(){
myColor = color(random(255),random(255),random(255));
}
}