W3C home > Mailing lists > Public > public-fx@w3.org > October to December 2014

Re: [css-transforms] Clarify use of matrices by columns in pseudo-code

From: Maurizio Casimirri <maurizio.cas@gmail.com>
Date: Mon, 22 Dec 2014 23:10:44 +0100
Message-Id: <C73D086A-A220-48E3-A3DC-6195D350C3FA@gmail.com>
To: public-fx@w3.org
Any particular reason to have matrix internally represented by array of columns in pseudo-code?

I think is more common to have them by row, but it may be better like that.

Anyway please make it clearer that you’re using M[col][row], cause I could guess it only from 2d decomposition code:
translate[0] = matrix[3][0]
translate[1] = matrix[3][1]
Where tx is m14 and ty is m24.

Also few lines below in 3d decomposition:
for (i = 0; i < 3; i++)
    row[i][0] = matrix[i][0]
    row[i][1] = matrix[i][1]
    row[i][2] = matrix[i][2]
This is completely confusing: we are trying to obtain a 3x4 sub-matrix or a 4x3 one? The name of the variable (row) 
makes me think of an array of rows, while row[i] will contain m0i, m1i, m2i instead, so those are the first 3 columns of the transform matrix, am i wrong?

One minor misprint here: `cross` function (that should be the cross product of 2 vector) is not listed in http://www.w3.org/TR/css3-transforms/#supporting-functions <http://www.w3.org/TR/css3-transforms/#supporting-functions>

Received on Thursday, 25 December 2014 19:37:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:52 UTC