Thursday, January 10, 2019

Converting diagnal field of view to horizontal or vertical fov

from http://vrguy.blogspot.com/2013/04/converting-diagonal-field-of-view-and.html

  • If Df is the diagonal field of view and Ha:Va is the horizontal to vertical aspect ratio, we can find the corresponding diagonal size in the same units as the aspect ratio: 
Da = sqrt(Ha*Ha + Va*Va)
  • The screen height and width are proportional to the tangent of the half angle. We use this to convert between field-of-view space and aspect-ratio space: 
Da = tan(Df/2) and Df = atan(Da) * 2
  • If the tangent and arctangent functions operate in degrees, we get: 
Hf = atan( tan(Df/2) * (Ha/Da) ) * 2
  • Here the tan() function converts from FOV to aspect-ratio space, the ratio is scaled in that space and then converted back into FOV space.