W3C home > Mailing lists > Public > www-style@w3.org > September 2010

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 08 Sep 2010 21:10:54 -0400
Message-ID: <4C88341E.3030805@mit.edu>
To: Chris Marrin <cmarrin@apple.com>
CC: "www-style@w3.org list" <www-style@w3.org>
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.

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....

Received on Thursday, 9 September 2010 01:11:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC