Search code examples
iphoneobjective-cuiimagepickercontrolleraugmented-reality

Augmented Reality with iPhone question


I'm currently reading this presentation about Augmented Reality and I'm asking myself why the coder are setting the x coordinate of the overlay element to 160-497.8*sin(relDirection). Look at slide 25 for more details. I understand the mathematic background about the geo calculation but how do you know the number 497.8 ? I think there is a logical background and I cant see it.

CGPoint overlayCenter = [overlayGraphicView center];
overlayCenter.y = 240.0 - 537.8 * sin(relativeVertAngleToMarriott);
overlayCenter.x = 160.0 - 497.8 * sin(relativeDirectionToMarriott);
[overlayGraphicView setCenter:overlayCenter];

thanks


Solution

  • You have a field vision of 37.5 so you need 360/37.5 = 9.6 iPhone screens to make a 360 panoramic photo. Given that each screen has 320 pixels width that makes 3072 pixels. 3072/2*Pi = 495 pixels

    To be honest, I have no idea what I'm talking about, I just kinda put all numbers on the mixer and found a match.