Note
列ベクトル方式で説明
OpenGLの透視投影の指定は
http://www.opengl.org/sdk/docs/man/xhtml/glFrustum.xml
(glFrustum)で行う。
glFrustum(left, right, bottom, top, near, far)
もうひとつこれの簡易版として
http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml
(gluPersepective)があって
gluPerspective(fovy, aspect, near, far)
となっている。 fovyは「Field Of View in the Y direction.」くらいの意味。Field of viewは視野角なので縦方向の視野角を意味する。単位は度。
glFrustumの行列は、
のように定義される。 このうちAとBはgluPersepectiveでは常に0になる。 左右対称(left+right=0)かつ上下対称(top+bottom=0)だからです。
これを代入すると
となる。 一方、gluPersepectiveの行列は、
と定義される。 gluPersepectiveのfに対応するglFrustumの
とするとcotangentの定義そのまま。 もう1つのf/aspectの方もそういうことで2式は等価になった。
gluPersepectiveはglFrustumの上下対称左右対称限定版で、 引数の取り方をちょっと変更したものと言える。