ortho() near and far parameters?
in
Programming Questions
•
2 years ago
Hi,
Does anybody know what the near and far parameters (last two parameters) of the ortho() function are supposed to change?
Whatever value I use for them I can't see any difference in the results.
The projection doesn't seem to change, nor does it affect which shapes are or aren't drawn.
See for example the following code:
Why 117? And why doesn't it depend on near and far?
Besides the clipping, if I add rotations, the result doesn't change a bit by changing the values for near and far.
Is this expected behavior? If so what am I missing?
What are the near and far parameters for?
Thanks
m.
Does anybody know what the near and far parameters (last two parameters) of the ortho() function are supposed to change?
Whatever value I use for them I can't see any difference in the results.
The projection doesn't seem to change, nor does it affect which shapes are or aren't drawn.
See for example the following code:
- float DEPTH=117;
- size(100, 100, P3D);
- noFill();
- smooth();
- ortho(0, width, 0, height, -10, 10);
- translate(100, 100, DEPTH);
- box(45);
Why 117? And why doesn't it depend on near and far?
Besides the clipping, if I add rotations, the result doesn't change a bit by changing the values for near and far.
Is this expected behavior? If so what am I missing?
What are the near and far parameters for?
Thanks
m.
1