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() and the up vector
Page Index Toggle Pages: 1
camera() and the up vector (Read 374 times)
camera() and the up vector
Apr 3rd, 2008, 12:16pm
 
I've been trying to rationalise the up vector used in the calls to camera() and no matter how i do it, i can't seem to wrap my head around how to derive the up vector. Can someone tell me what and how to apply the up vector to the calls to camera()?
Re: camera() and the up vector
Reply #1 - Apr 3rd, 2008, 1:16pm
 
I'm not quite sure what your problem is.

At a guess you know where you want your camera to be, and where you want it looking at? Do you have an idea of what you want "upwards" to be? The up-vector doesn't have to be at 90' to the "forwards" one, if you (say) just want Z to be upwards, you can just use 0,0,1 for your up vector (this will act funny if your looking at vector goes under the camera however)
Re: camera() and the up vector
Reply #2 - Apr 3rd, 2008, 7:20pm
 
Well it's like this, if i use an up vector of (0,-1,0), then y is positive upwards and x is positive leftwards. (0,1,0), y is positive downwards and x is positive rightwards.

i'm not familiar with camera matrices, so how is this vector applied to rotate the global axes?

Page Index Toggle Pages: 1