
Post by kalldrexx on Nov 2, 2019 20:42:31 GMT
I've tried to go through each test of the book pretty carefully to make sure I understand the math, since it's been at least a decade since I've done most of this type of stuff (and I don't think I ever had a linear algebra course in high school or college, though I could be misremembering).
So when it started talking about Translations it gave some tests that won't pass which consists of multiplying the Tuples by a 4x4 matrix. However, going backwards in the Matrix chapter (3) it never deals with matrix multiplication outside of 4x4 multiplied by another 4x4, which is fine because the text of the chapter says it will get to how to make the tests pass.
However, then it just says "this is what a translation matrix looks like" and then "Slick! Make those tests pass and we''ll get to scaling". Except it's totally missed how you actually perform a multiplication of a 4x4 matrix by a tuple. After confusion I looked back at the previous chapters and couldn't find anything that I missed that explained how to do it. I then did some googling and eventually found someone else's project for this book and look up how they do it.
It turns out you just need to take each row of the 4x4 matrix as a single tuple and get the dot product of it vs the tuple and that's how you get the x, y, z, and w components. I did that and viola, tests pass.
Yet I"m still confused on what I missed on where this is explained in the book. Can someone point me to where the book goes over that?



Post by accolon on Nov 3, 2019 17:48:40 GMT
Multiplying matrices by tuples is explained in Chapter 3, "Multiplying Matrices", just before "The Identity Matrix" starts.
The test is called: "Scenario: A matrix multiplied by a tuple"



Post by kalldrexx on Nov 3, 2019 22:04:02 GMT
I see, I wonder how I missed that. Thanks,

