Skip to content

[css-transforms-2] Clarify use of matrices by columns in pseudo-code #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
smfr opened this issue Jan 13, 2017 · 2 comments
Open

[css-transforms-2] Clarify use of matrices by columns in pseudo-code #924

smfr opened this issue Jan 13, 2017 · 2 comments

Comments

@smfr
Copy link
Contributor

smfr commented Jan 13, 2017

https://lists.w3.org/Archives/Public/public-fx/2014OctDec/0134.html

Hi,
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

@dirkschulze
Copy link
Contributor

There probably should be a new issue for CSS Transforms 2 for the 3d re/decomposition.

@dirkschulze
Copy link
Contributor

Reopening issue for changes to Level 2

@dirkschulze dirkschulze reopened this May 24, 2018
@svgeesus svgeesus changed the title [css-transforms-1] Clarify use of matrices by columns in pseudo-code [css-transforms-2] Clarify use of matrices by columns in pseudo-code Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants