OpenGL 超级线性代数 - 这是正确的吗?

发布于 2024-09-14 14:41:41 字数 279 浏览 2 评论 0原文

我最近开始阅读 OpenGL Superbible 第五版,并注意到以下内容:

Equation in question

刚刚学习了线性代数,这对我来说似乎很奇怪。列向量的尺寸为 4x1,矩阵的尺寸为 4x4,如何将它们相乘?如果向量是行向量并且输出是行向量,我同意这是可能的,但是这个?

更新:我给作者发了电子邮件,他说我是对的。他注意到前一版的顺序是错误的,但最终在第五版中没有得到修复。

I recently started reading OpenGL Superbible 5th edition and noticed the following:

Equation in question

Having just taken linear algebra this seemed odd to me. The column vector is of dimension 4x1 and the matrix is 4x4, how is it possible to multiply them together? If the vector were a row-vector and the output were a row vector I agree that it would be possible, but this?

Update: I emailed the author and he said that I was correct. He noticed the order was wrong in the previous edition of the book, however it ended up not being fixed in the 5th edition.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

┾廆蒐ゝ 2024-09-21 14:41:41

我同意:它应该是一个预先乘以单位矩阵的列向量。

如果它是行向量,则 RHS 也必须是行向量才能使维度匹配。

I agree: it should be a column vector that's pre-multiplied by the identity matrix.

If it's a row vector, then the RHS needs to be a row vector as well to make the dimensions match.

不…忘初心 2024-09-21 14:41:41

这不是拼写错误或错误,它是 3D 图形中表达向量矩阵乘法的常见方法。但从数学上来说,你是正确的:左边的向量应该水平书写。但在 3D 中你永远不会看到这一点。

This is not a typo or an error, it's a common way in 3D graphics to express vector-matrix multiplications. But mathematically speaking, you are correct : the left vector should be written horizontally. In 3D you will never see this, though.

习惯成性 2024-09-21 14:41:41

这是本书所有与矩阵相关的示例中的一个常见错误。请参见清单 4.1,标题显示“平移然后旋转”,而书本代码和可执行示例代码都显示“旋转然后平移”行为。叹。

It's a common mistake through all the book's matrix-related examples. See LISTING 4.1, the caption says "Translate then Rotate", while both the on book code and the executable sample code show "rotate-then-translate" behavior. Sigh.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文