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

On Sep 9, 2010, at 1:25 PM, Brendan Kenny wrote:

> On Thu, Sep 9, 2010 at 1:08 PM, Chris Marrin <cmarrin@apple.com> wrote:
>> 
>> On Sep 9, 2010, at 9:26 AM, Boris Zbarsky wrote:
>> 
>>>> Yes I agree that this can be more clear. But to be clear a proper homogeneous multiplication of a matrix by a vector would divide the resultant x, y, z values by the 4th component, w.
>>> 
>>> Sure (unless w == 0, etc).  But the point is, the spec needs to define all this, either inline or by reference.
>> 
>> Right. The only way w could equal 0 is if the matrix is singular, You'd have to catch this case, but rendering would not be an issue.
>> 
>> -----
>> ~Chris
>> cmarrin@apple.com
> 
> Is the intent for perspective to be added only via the perspective
> property, then? Because (some) perspective transforms are nonsingular
> and map all the points in the eye plane (for instance) to the plane at
> infinity.

It's completely reasonable to construct your own perspective matrix by writing values to m43 and m44 (for instance). In fact, you can produce any sort of matrix. Whether doing math with it makes any sense is another question! The nice thing about a homogeneous representation is that you get back homogeneous results so you can interpret the 'w' value however you like.

> 
> I actually agree with both of you; these problems are all well known
> and unsurprising, but there are some ambiguities that would be cleared
> up (or at least some detective work avoided) with more explicit
> transformation definitions (a la the SVG coordinate
> system/transformation section[1]).

Right, hopefully we can avoid giving the formula for matrix and vector multiplication and rely on terms like "left multiply" or "post multiply" and other well accepted terms. But we do need to be more clear.

-----
~Chris
cmarrin@apple.com

Received on Thursday, 9 September 2010 20:39:48 UTC