Re: [css3-2d-transforms] Interop: matrix() values e,f <number> or <length>

On 11/17/10 8:32 PM, Brendan Kenny wrote:
> I just mean the matrix is a manipulation of a space, which must have
> units because you are specifying points to be transformed using them.

Why?

In particular, thinking of affine transforms as operations on P^2 
involves thinking of your 2-element vectors as vectors in homogeneous 
coordinates.  The particular way you do that defines what your matrix 
means, right?

And in particular, there's no particular reason that the different 
coordinate axes in the homogenous coordinate space need to have the same 
units.  In practice, you could define that they're all lengths and that 
all 2-element vectors map to the plane at z = 1px, but that's an 
arbitrary choice.  You could just as easily define the plane as mapping 
to z=2px, z=1em, or as mapping to z=1 and require that the corresponding 
matrix entries have dimensionality of length.  For purposes of using 
homogeneous coordinates, this really doesn't matter as long as you're 
consistent.

The only question is what will be most convenient and intuitive for 
authors.  How many authors are familiar with homogeneous coordinates on 
P^2 in the first place?  How many will think of this entirely as 
transformations on the plane?  For the latter, having a translation 
vector that you can specify as an actual translation with CSS units is 
very useful, I think.

> As I said though, it's also typical to think of an affine transform as
>
> (linear transform)*point + (translation vector)
>
> in which case the translation vector has to have units. I just think
> that if an author is using the matrix function (instead of the
> translate function), they are more likely thinking in the former way,
> not the latter.

I would be pretty surprised by that, actually.  I would welcome data on 
whether typical authors are actually familiar with projective geometry, 
though.

-Boris

P.S.  Note that I fully expect most uses for the matrix function to come 
from things like reading computed values out of transitioning or 
animating elements, or from some sort of script-generated stuff; I don't 
see anyone hand-authoring matrix().

Received on Thursday, 18 November 2010 02:18:43 UTC