Now I have started on a new project. I want the scene to add more and more elements as a rectangel, by it self as the scene continue. If someone know what I mean :) Hope someone can help me out. My code so far:
- import processing.opengl.*;
float a;
void setup() {
size(800, 600, OPENGL);
fill(1);
noStroke();
}
void draw() {
background(255);
translate(width/2, height/2);
rotateX(a);
rotateY(a*3 );
//Start rotate angels //
rotateX(a);
rotateY(a*5);
rotateX(PI/2);
rotateY(a*0);
rotateY(a*1);
rotate(a*1);
rotateY(a*1);
rotateY(a*0);
rotateX(PI/2);
rotateX(a);
rotateY(a*1);
rotateX(PI/2);
rotateY(a*1);
rotateY(a*1);
// End rotate angels //
// Rectangels
rect(-100, -100, 100, 100);
fill(sin(a)*204, 502, 0);
fill(sin(a)*204, 202, 0);
//End rectangels
a += 0.01;
}
1