Graphics 如何将夜空投射到相机中?

Graphics 如何将夜空投射到相机中?,graphics,3d,camera-calibration,Graphics,3d,Camera Calibration,我想写一个类似于虚拟望远镜的东西,它可以观察夜空 到目前为止,我有一个星表,我想把它们投影到一架飞机上,得到一张模拟照片 我推测这个投影是一个灵知投影,它可以被找到并得到 在第二个链接中,alg用于计算恒星的像素位置 Forward: Define scale: number of pixels per degree in the map alpha, delta: Equatorial coordinates of a given position a

我想写一个类似于虚拟望远镜的东西,它可以观察夜空

到目前为止,我有一个星表,我想把它们投影到一架飞机上,得到一张模拟照片

我推测这个投影是一个
灵知投影
,它可以被找到并得到

在第二个链接中,alg用于计算恒星的像素位置

Forward:
Define
      scale:  number of pixels per degree in the map
      alpha, delta:  Equatorial coordinates of a given position
      alpha0, delta0:  Equatorial coordinates of the map center
      A = cos(delta) x cos(alpha - alpha0)
      F = scale x (180/pi)/[sin(delta0) x sin(delta) + A x cos(delta0)]
then the pixel coordinates in the image are

      LINE = -F x [cos(delta0) x sin(delta) - A x sin(delta0)]
      SAMPLE = -F x cos(delta) x sin(alpha - alpha0)
Reverse:
Define
      X = SAMPLE/(scale x 180/pi)
      Y = LINE/(scale x 180/pi)
      D = arctan[(X^2 + Y^2)^0.5]
      B = arctan(-X/Y)
      XX = sin(delta0) x sin(D) x cos(B) + cos(delta0) x cos(D)
      YY = sin(D) x sin(B)
then the right ascension and declination are

      alpha = alpha0 + arctan(YY/XX)
      delta = arcsin[sin(delta0) x cos(D) - cos(delta0) x sin(D) x cos(B)]
NOTE: The arctangent functions for B and alpha must be four-quadrant arctangents.
但是我不知道角度应该是deg还是rad,以及采样和线的含义是什么

我也不确定是否要使用灵知投影


欢迎提供任何帮助或讨论。

是的,只需执行一个普通的摄像项目