Re: [css3-3d-transforms] matrix3d() uses column-major order, but CSSMatric properties row-major ?

On Sep 8, 2010, at 6:10 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 9/8/10 8:52 PM, Chris Marrin wrote:
>> We should also make the order of parameters passed to matrix3d() clear. I don't think it is clear currently.
> 
> The spec pretty clearly says:
> 
> matrix3d(<number>, <number>, <number>, <number>, <number>, <number>,
>          <number>, <number>, <number>, <number>, <number>, <number>,
>          <number>, <number>, <number>, <number>)
>    specifies a 3D transformation as a 4x4 homogeneous matrix of 16
>    values in column-major order.
> 
> I don't know what's unclear about that, unless the reader doesn't know what column-major order is.  On the other hand, I suppose one could argue that this definition is pretty jargon-heavy, between that and the "homogeneous matrix" bit.

It would be more clear if we listed the paeans in terms of the attr values (m11, m12, ...)

> 
> What the spec does NOT define, on the other hand, is what transformation this matrix represents.  For example, nowhere does it say that such a matrix transforms the point (x, y, z) to (x', y', z') by taking the column vector (x, y, z, 1) and left-multiplying by the given transformation matrix, then taking the first three coordinates of the resulting vector in order.  At least this is what I assume it means to do.  If it were doing right-multiplication on row vectors, then the same transformation would, of course, be represented by the same numbers but now in row-major order....

Yes I agree that this can be more clear. But to be clear a proper homogeneous multiplication of a matrix by a vector would divide the resultant x, y, z values by the 4th component, w.

Received on Thursday, 9 September 2010 15:57:50 UTC