does change the field of view equivalent to multiply by scale matrix?

此生再无相见时 提交于 2019-12-17 21:20:19

问题


Using perspective view, does change the field of view equal to multiplying by scale matrix?

Usally I think it is much natural to change the field of view.


回答1:


No because in Perspective Projection scale is different for different distances

The more distant object is the less scale it has that is why inside perspective matrix are goniometric functions. Btw. OpenGL gluPerspective has very inaccurate cotan causing problems when you try to overlap more perspective views together and also distorts the view so you can sometimes look behind corner or see object that can not see you ... If you replace them by precise ones then suddenly all is OK :)

On the other hand scale matrix has just nonzero constants on the diagonal which just (un)Zoom the view constantly on whole Z range ...

[edit1] If you change field of view

it may look like you applied x,y scale but the Z coordinates are different... so if you use scale instead of applying new perspective then image may seem the same but Z-coordinates will be the same as in original view hence all Z-coordinate depending operations get wrong from that point

In other words Projection is not the same as Scaling. For more info see

  • Understanding 4x4 homogenous transform matrices


来源:https://stackoverflow.com/questions/23935936/does-change-the-field-of-view-equivalent-to-multiply-by-scale-matrix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!