돌고래 홈페이지
ID:
PW:


  운영자(2005-03-15 10:25:39, Hit : 2882, Vote : 1297
 카메라 fov

THREE.js

height = 2 * Math.tan( ( vFOV / 2 ) ) * dist;

aspect = window_width / window_height;
hFOV = 2 * Math.atan( Math.tan( vFOV / 2 ) * aspect );
width  = 2 * Math.tan( ( hFOV / 2 ) ) * dist;

https://en.wikipedia.org/wiki/Field_of_view_in_video_games

r = w/h = tan(H/2) /  tan(V/2)
H = 2artan(tanV/2) * w/h)
V = 2artan(tan(H/2) * h/w)

https://themetalmuncher.github.io/fov-calc/
  function calc()
  {
    var width  = document.getElementById("hres").value;
    var height = document.getElementById("vres").value;

    var hfovRad = document.getElementById("hfov").value * Math.PI / 180;

    var vfovRad = 2*Math.atan(Math.tan(hfovRad/2)*height/width);

    document.getElementById("vfov").value = Math.ceil(vfovRad* 180 / Math.PI);
  }




수학
회전행렬

Copyright 1999-2022 Zeroboard / skin by zero