We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › camera issue - micro display
Page Index Toggle Pages: 1
camera issue - micro display? (Read 1075 times)
camera issue - micro display?
May 5th, 2005, 8:48pm
 
I have tried a few applets with 87, and am getting
something unusual: the object(s) being displayed
are shown very small. Take the "Ortho" example
(OrthoVSPerspective). The behavior on an Inspiron XPS
(with a mobile radeon 9800) is such that when the
window is pressed with a left-mouse button, the
resulting cube is very small (to the point of barely
being able to see it). When the mouse button is
released, it goes back to the ortho view with
normal sized box. I have the latest Dell drivers for
the 9800 installed - just reinstalled them. This
also happened with a posted Metaballs port to 87: I
get the metballs but they are very small in the
center of the window.

Just tried the Camera->perspective example, which is
equally as bizarre: the display jumps radically to
various boxes of different sizes and I have no idea
what is going on.
Re: camera issue - micro display?
Reply #1 - May 6th, 2005, 12:48am
 
could it be the issue of fov changing from degrees to radians? it's possible that i didn't give casey enough warning to fix any examples taht would've used that.
Re: camera issue - micro display?
Reply #2 - May 6th, 2005, 3:49am
 
The problem is with the field of view. Everything was changing to radians and that had been a degree value in versions prior to 87 due to legacy issues. You can easily fix the examples by making the following changes.

For Perspective change:
Code:
  perspective(fov, aspect, cameraZ/10.0, cameraZ*10.0); 

to
Code:
perspective(radians(fov), aspect, cameraZ/10.0, cameraZ*10.0); 



For OrthoVSPerspective change:
Code:
perspective(fov, float(width)/float(height), 
cameraZ/10.0, cameraZ*10.0);
to
Code:
perspective(radians(fov), float(width)/float(height), 
cameraZ/10.0, cameraZ*10.0);


<<edited for clarity>>
Page Index Toggle Pages: 1