Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » Forum » General Wiimote and Technology » Project Ideas » Question about Camera's vertical position - Please help!
Pages: [1]
  Print  
Author Topic: Question about Camera's vertical position - Please help!  (Read 349 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 37
Offline Offline
View Profile
« on: January 27, 2009, 06:54:59 AM »

Hi !
There are few important question in John Lee's code that I can't understand ! Can you help me with them ?!...

Code:
relativeVerticalAngle = (avgY - 384) * radiansPerPixel;//relative angle to camera axis

            if(cameraIsAboveScreen)
               headY = .5f+(float)(movementScaling * Math.Sin(relativeVerticalAngle + cameraVerticaleAngle)  *headDist);
            else
               headY = -.5f + (float)(movementScaling * Math.Sin(relativeVerticalAngle + cameraVerticaleAngle) * headDist);


- The headDist calculated in Vertical position differs with that in Horizontal position. John is using the same headDist in both cases? Isn't he doing that wrong...?! headDist_Y^2=DheadY^2+headDist_X^2 where headDist_X is the head distance calcualted in the Horizontal poistion.Why is he ignoring this simple fact!!!!?

- What is the effect adding +/- 0.5 f to the formula?

- Why do we need to write (AvgY-384) and NOT only Avg Y? is the subtraction necessary?

Hope some body can assist me alittle!


Logged
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v.1.0.6 beta 2 © Bloc
Clicky Web Analytics