Bug in 3D?
in
Programming Questions
•
1 year ago
Hello,
I'm rather new to processing but (as any newbie
) found directly a bug.
I need to do some 3D modeling. If I plot a box which is much larger than the viewport I get a rendering error. This error is different in different situations so not 100 percent reproducible but nevertheless I can demonstrate it. Where is the problem?
This works:
I'm rather new to processing but (as any newbie

I need to do some 3D modeling. If I plot a box which is much larger than the viewport I get a rendering error. This error is different in different situations so not 100 percent reproducible but nevertheless I can demonstrate it. Where is the problem?
This works:
- void setup()
{
size(600,400,P3D);
lights();
smooth();
camera(width/2+100,height/2-100,100,
width/2,height/2,0,
0,1,0);
fill(150,0,0);
}
void draw()
{
background(255);
float len = 1000.0*mouseX;
translate(width/2,height/2-len/2,0);
box(100,len,10);
}
- void setup()
{
size(600,400,P3D);
lights();
smooth();
camera(width/2+100,height/2-100,100,
width/2,height/2,0,
0,1,0);
fill(150,0,0);
float len = 1000.0;
translate(width/2,height/2-len/2,0);
background(255);
box(100,len,10);
}
1