W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: API for matrix manipulation

From: Paul Bakaus <pbakaus@zynga.com>
Date: Tue, 22 Mar 2011 08:43:05 -0700
To: Chris Marrin <cmarrin@apple.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: Joćo Eiras <joao.eiras@gmail.com>, "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <C9AE81CF.4C74%pbakaus@zynga.com>
Just wanted to throw in Sylvester, which is a fairly cool Math JS lib for
generic Matrix and Vector computations (http://sylvester.jcoglan.com/). I
especially like it as the API feels like it is designed for human beings.
Having Matrix/Vector as generic interfaces sounds like a big win.

Am 18.03.11 21:50 schrieb "Chris Marrin" unter <cmarrin@apple.com>:

>
>On Mar 15, 2011, at 5:08 PM, Tab Atkins Jr. wrote:
>
>> On Tue, Mar 15, 2011 at 5:00 PM, Chris Marrin <cmarrin@apple.com> wrote:
>>> I think it would be nice to unify the classes somehow. But that might
>>>be difficult since SVG and CSS are (necessarily) separate specs. But
>>>maybe one of the API gurus has a solution?
>> 
>> We just discussed this on Monday at the FXTF telcon.  Sounds like
>> people are, in general, okay with just using a 4x4 matrix, though
>> there are some possible implementation issues with devices that can't
>> do 3d at all.  (It was suggested that they can simply do a 2d
>> projection, which is simple.)
>
>I don't think there are implementation issues other than performance
>related ones. As you say, you can always flatten a 3D matrix for use in a
>purely 2D renderer. We do this in the WebKit implementation in some
>cases. But doing 4x4 matrix math can be expensive, especially on less
>capable hardware,. So it would probably be valuable to have a set of 2D
>affine calls on any future 4x4 class, so an implementation can easily
>optimize by knowing they can get away with doing a subset of the math if
>all the operands are 2D affine matrices. But that's just a bit of extra
>API.
>
>-----
>~Chris
>cmarrin@apple.com
>
>
>
>
>
Received on Tuesday, 22 March 2011 15:43:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:43 GMT