Processing (http://processing.org) is incredibly easy as programing languges go. The sketch below took five minutes to write and debug.
import processing.opengl.*;
float angle1=0.1;
float fillCol=0.0;
void setup(){
size(600,400,OPENGL);
//noStroke();
}
void draw(){
background(100);
//lights();
pointLight(256, 256, 256, fillCol, 200, 36);
translate(300,200,-100);
for (int i=0;i<80;i++){
pushMatrix();
rotateY(sin(radians(fillCol))*-i);
rotateX(cos(radians(angle1))*-fillCol);
rotateZ(sin(radians(angle1))*-i);
translate((2*i),2*i,2*1);
box(i,i,20+i);
//fill(10+(i*2));
fill(i*2+50);
popMatrix();
}
angle1+=.15;
}
void mouseDragged(){
fillCol=fillCol+0.1;
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment