Thanks for the reply. The only problem is that I was working in P3D. I turned over to openGL and there seems to be a problem. When you zoom in all the way there is a lot of white space. Here is my code.
Change opengl to P3D and get rid of the import to see what it looks like in P3D.
Quote:
import processing.opengl.*;
float[] tr = new float[20];
void setup(){
size(1000, 1000, OPENGL);
background(255);
for(int i=0; i<tr.length; i++){
tr[i]= 94;
}
}
void draw() {
lights();
background(255);
float cameraY = height/2.0;
float fov = mouseX/float(width) * PI;
float cameraZ = cameraY / tan(fov / 2.0);
float aspect = float(width)/float(height);
if(mousePressed) {
aspect = aspect / 2.0;
}
perspective(fov, aspect, cameraZ/10.0, cameraZ*10.0);
translate(width/2+30, height/2, 0);
rotateX(-PI/6);
rotateY(PI/3 + mouseY/float(height) * PI);
pushMatrix();
for(int i=0; i<tr.length; i++){
box(tr[i]);
}
popMatrix();
for(int i=0; i<tr.length; i++){
tr[i]+= i+1;
pushMatrix();
//translate(height/2, width/2);
if (mousePressed == true) {
noStroke();
fill(100,i+100,i+100,i+25);
}
else {
stroke(100,i+100,i+100,i+50);
noFill();
}
translate(-200, 200, -200);
beginShape();
curveVertex(tr[i], mouseY+100, tr[i]);
curveVertex(mouseY+50, mouseX, tr[i]);
curveVertex(68+tr[i], 19, tr[i]);
curveVertex(-21, -100, tr[i]);
curveVertex(-50, -mouseY);
curveVertex(-tr[i], -tr[i] );
endShape();
if (tr[i]>width*9){
tr[i]=0-1;
}
popMatrix();
}
}