I finally understand matrices
Matrices always confused me. I knew they were used for transformations in 3D rendering, and Sphere has the color matrix which allows similar tricks with RGB colors... but I never understood more than that, it all just seemed like black magic. Even the Wikipedia articles didn't help--all the algebraic equations just go right over my head. It wasn't until I was working on improving minisphere's ColorMatrix object last night that it finally clicked: All the matrix is doing is setting each component of the output (color, point in space, etc.) proportionally to one or more components in the input. This is why scaling factors are on the diagonal rather than filling the matrix--each component is set proportionally only to itself.
Basically it's a weighted average in N dimensions. It's quite elegant.
I also now understand why 3D matrices are 4x4 as well: In order for translation to work, you need to have a known constant factor somewhere. So you have the W coordinate, which is always 1 so that you can express translation as a product of it (W=1 * tx/ty/tz).
Why could I not find this layman's perspective on matrices anywhere else? Everywhere I looked showed the mathematical theory behind them, but not much else. If I had seen the description above, I would have understood immediately and then the math would have made more sense.
miniSphere 5.2b2 (stable:
5.1.3) -
Cell compiler -
SSj debugger -
thread |
on GitHubFor the sake of our continued health I very much hope that Fat Cerberus does not become skilled enough at whatever arcane art it would require to cause computers to spawn enourmous man eating pigs ~Rhuan