gpt4 book ai didi

math - 正交投影矩阵的公式?

转载 作者:行者123 更新时间:2023-12-04 07:14:44 27 4
gpt4 key购买 nike

我一直环顾四周,似乎无法找到我正在寻找的东西。我找到了“规范公式”,但是使用这些公式的最佳方法是什么?我是否必须缩小每个顶点? 或者,还有更好的方法?

一个公式真的可以帮助我,但我也在寻找关于相对于观察者位置的近和远 z 平面的解释

最佳答案

这是一个合理的来源,它派生了 orthogonal project matrix :

Consider a few points: First, in eye space, your camera is positioned at the origin and looking directly down the z-axis. And second, you usually want your field of view to extend equally far to the left as it does to the right, and equally far above the z-axis as below. If that is the case, the z-axis passes directly through the center of your view volume, and so you have r = –l and t = –b. In other words, you can forget about r, l, t, and b altogether, and simply define your view volume in terms of a width w, and a height h, along with your other clipping planes f and n. If you make those substitutions into the orthographic projection matrix above, you get this rather simplified version:



以上所有内容都为您提供了一个看起来像这样的矩阵(如果您希望生成的转换矩阵处理任意相机位置和方向,请酌情添加旋转和平移)。

A LaTeX rendering of the orthographic projection matrix
(来源: codeguru.com)

关于math - 正交投影矩阵的公式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/688240/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com