Re: [css3-transforms] Multiplication order

On 11/12/12 10:56 AM, Dirk Schulze wrote:
> 2. Translate by the computed X, Y and Z values of ‘transform-origin’
> 	Create a translation matrix and multiply with I: T = I * Trans

We're good so far.

> 3. Multiply by each of the transform functions in ‘transform’ property from left to right
> 	T = I * Trans * A * B * C

The problem is that "multiply" could easily mean left-multiplication, 
which would give:

   T = C * B * A * I * Trans

What we need to clarify is that this is not what happens.

> 4. Translate by the negated computed X, Y and Z values of ‘transform-origin’
> 	T = I * Trans * A * B * C * TransBack

And here it needs to be made clear that this is what happens, and not

   T = TransBack * I * Trans * A * B * C

For what it's worth, your phrasing in the mail I'm replying to is _much_ 
better than what's in the spec right now.

> Is the part that confuses you the part with A * B * C?

No, it's the part about how "left to right" and "multiply" interact. 
The obvious meaning to me there is that you take the matrices one by 
one, in left to right order, and multiply by them.  But then you need to 
say which side you multiply by them on.

> Or how to multiply these transformation matrices to the identical transform with the translation (I * Trans * A * B * C)? Do you disagree with the order in general?

I agree with the order.  It just needs to be made clear.

-Boris

Received on Monday, 12 November 2012 20:24:12 UTC