MatrixTransform 的矩阵在我看来是转置的
这更多的是一个好奇为什么 MatrixTransform 是这样的问题,而不是一个真正的问题。
MSDN 给出了 MatrixTransform 的仿射变换矩阵,如下所示:
m11 m12 0
A := m21 m22 0
offX offY 1
http://msdn.microsoft.com/en-us/library/system.windows.media.matrixtransform(v=VS.100).aspx
要变换一个点,您可以使用它方式:x' = xTA
。这与我所期望的不同 - x' = Ax
,它使用这个矩阵:
m11 m12 offX
A := m21 m22 offY
0 0 1
我意识到这对于 MatrixTransform 的实现没有区别,但我想知道这里是否缺少一些见解。有谁知道为什么变换矩阵是这样指定的?
This is more a question of curiosity why MatrixTransform the way it is, rather than a real problem.
MSDN gives the affine transformation matrix of MatrixTransform like this:
m11 m12 0
A := m21 m22 0
offX offY 1
http://msdn.microsoft.com/en-us/library/system.windows.media.matrixtransform(v=VS.100).aspx
To transform a point, you use it this way: x' = xTA
. This is different from what I would expect - x' = Ax
, which uses this matrix:
m11 m12 offX
A := m21 m22 offY
0 0 1
I realize that this makes no difference for the implementation of MatrixTransform, but I wonder if am missing some insight here. Does anyone know why the transformation matrix is specified the way it is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用矩阵行优先而不是列优先只是一种约定。大多数计算机图形系统都遵循此约定。
It's just a convention to have the matrix row-major instead of column major. Most computer graphics systems follow this convention.