是否改变视场相当于乘以比例矩阵? [英] does change the field of view equivalent to multiply by scale matrix?

查看:20
本文介绍了是否改变视场相当于乘以比例矩阵?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用透视图,改变视野是否等于乘以比例矩阵?

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.

推荐答案

否,因为在 Perspective Projection 中,不同距离的比例是不同的

越远的物体尺度越小,这就是为什么透视矩阵内部是测角函数的原因.顺便提一句.OpenGL gluPerspective 具有非常不准确的 cotan,当您尝试将更多透视图重叠在一起时会导致问题,并且还会扭曲视图,因此您有时可以看到角落后面或者看到看不到你的物体......如果你用精确的替换它们,那么突然一切都好:)

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 :)

另一方面,比例矩阵在对角线上只有非零常量,它只是(取消)在整个 Z 范围内不断缩放视图......

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] 如果改变视野

它可能看起来像您应用了 x,y 比例但 Z 坐标是不同的...所以如果您使用比例而不是应用新视角,那么图像可能看起来相同,但 Z 坐标将与原始视图中的相同,因此所有依赖 Z 坐标的操作都会出错

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

这篇关于是否改变视场相当于乘以比例矩阵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆