View Full Version : Would Matrix3 be a 4x4 matrix?
MagicToy 10-18-2008, 01:45 PM Hi,
According to MaxScript's help: "The Matrix3 class implements a 4x3 3D transformation matrix object."
Well... since we can multiply two Matrix3 matrices (ex: M3 = M1 * M2), I can't agree that the Matrix3 is really a 4x3 matrix, because that math operation is incompatible...
...so, actually, would Matrix3 be a 4x4 matrix? ...like the following:
| m11 m12 m13 0 |
| m21 m22 m23 0 |
| m31 m32 m33 0 |
| m41 m42 m43 1 |
Thanks in advance
|
|
RobGalanakis
10-18-2008, 04:23 PM
I believe the fourth column is generated automatically by Max. I'm sure Bobo has some posts on the subject.
You can check out the BigMatrix, though, it allows arbitrary matrix sizes I think.
MagicToy
10-18-2008, 08:51 PM
Thanks Professor420. Since we usually never change the values in the fourth column, perhaps the MXS developers decide to hide it.
Thanks Professor420. Since we usually never change the values in the fourth column, perhaps the MXS developers decide to hide it.
Historically speaking, since a transformation matrix never needs the 4th column to do what ot does, and because MAXScript in Max 2.0 did not provide a Point4 value, the developer of MAXScript went with a matrix3 value which expects 4 Point3 arguments. This simplifies things a lot, because this ways someNode.transform.row4 is the translation part which is EQUAL to the .pos property of the node, both being Point3 values. Imagine if .transform.row4 returned a Point4 and you had to extract the first three components just to get a position, or setting a position by having to cast a Point3 as Point4 each time... That would have been a PITA.
In Max 6, a Point4 value class was added to support mental ray floating point colors, but thankfully the matrix3 remained.
MAXScript was designed mainly for artists and technical artists, not programmers (who were using the Max SDK since version 1.1 already). So the real nature of a matrix3 value never really mattered to the user, until you came along ;)
MagicToy
10-20-2008, 08:01 PM
Thanks Bobo. Good explanation. :)
CGTalk Moderation
10-20-2008, 08:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.