开发者

Trying to understand matrices (3D programming)

开发者 https://www.devze.com 2023-02-24 08:36 出处:网络
http://i52.tinypic.com/5mmjoi.png <- take a peek here for the equations Well, I\'ve been studying matrices lately as I was interested more into the workings of changes of coordinate systems, obj->

http://i52.tinypic.com/5mmjoi.png <- take a peek here for the equations

Well, I've been studying matrices lately as I was interested more into the workings of changes of coordinate systems, obj->world and such. And I am looking at this couple o开发者_运维百科f equations which are trying to interpret the vector-matrix multiplication as a linear combination of the matrix's row vectors scaled by the individual components of the u vector.

I do understand that they are just "reshaping" it into a few components, scaling the basis vectors of the translated coordinate system. The standard vector product is exactly the same as the combined row vectors scaled by x,y,z. It's more intuitive to see it when it is decomposed as such than just vague multiplications of the y coordinate with the second vector's x coordinate in the standard version and then added to the z and x values, how the dot product dictates.

My question is: How does one know what alterations are allowed, he just simply picks out the parts of the solution vector, sorting it by x, y and z. Do you simply do that or are there rules. The result certainly is correct, he has all the stuff necessary for a linear combination but how does he know what can and can't he touch?

A little more elaboration, even from the top, would be appreciated? Basically how and why does this work? Thanks everyone!


If I understand your question correctly, it's just a matter of grouping like terms. We start with regular multiplication uM:

            | m11 m12 m13 |
| x y z | * | m21 m22 m23 | = | xm11+ym21+zm31 xm12+ym22+zm32 xm13+ym23+zm33 |
            | m31 m32 m33 | 

The author of your image wants to show that the dot product of the vector with each column is the same thing as taking a weighted sum of each row so that's how he breaks the resulting vector apart. He's free to break it apart any which way he wants so long as the final sum remains the same.

E.g.:

| xm11+ym21+zm31 xm12+ym22+zm32 xm13+ym23+zm33 | =
| xm11+ym21 xm12+ym22 xm13+ym23 | + | zm31 zm32 zm33 | =
| xm11 xm12 xm13 | + | ym21 ym22 ym23 | + | zm31 zm32 zm33 | =
| xm11 ym22 zm33 | + | ym21 zm32 xm13 | + | zm31 xm12 ym23 | =
| xm11+ym21+zm31-1 xm12+ym22+zm32-1 xm13+ym23+zm33-1 | + | 1 1 1 | 

Etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消