Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
430 views
in Technique[技术] by (71.8m points)

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

gluPerspective

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...