W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2012

Re: Matrix4x4 proposal

From: 勤 <gman@google.com>
Date: Sun, 29 Jan 2012 15:58:40 -0800
Message-ID: <CAKZ+BNpNQoUgS9N29m79XFmiuNjkVFbG3tjiz1DZ8KwEKq4X3Q@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: Kristian Sons <kristian.sons@dfki.de>, public-fx@w3.org
On Mon, Jan 23, 2012 at 5:48 PM, Dean Jackson <dino@apple.com> wrote:

>
> On 24/01/2012, at 12:46 PM, Gregg Tavares (勤) wrote:
>
>
>
> On Mon, Jan 23, 2012 at 3:57 PM, Dean Jackson <dino@apple.com> wrote:
>
>>
>> On 20/01/2012, at 11:03 PM, Kristian Sons wrote:
>>
>> > Hi,
>> >
>> >> // The value of angle is in radians.
>> >>     void rotateAxisAngle(in double x,
>> >>                          in double y,
>> >>                          in double z,
>> >>                          in double angle);
>> >
>> > I didn't follow the discussion from the beginning, so this might be
>> already discussed:
>> > In the CSSMatrix proposal, all angles are in degrees. Also SVG uses
>> degrees in interfaces. Do you want to change to radians?
>>
>> We agreed to stick with degrees. I need to post an updated proposal.
>>
>
> Really? Are angles expected to be in degrees by devs who will actually use
> these classes?
>
>
> This is why I originally proposed radians. I don't feel strongly either
> way.
>

I don't know what everything else uses but I will point out

Canvas uses radians
CSS can use degrees or radians or gradians or turns
CSSMatrix sadly uses degrees (though it's still a draft.)

While I get that designers will want degrees they seem covered by CSS. On
the other hand it seems arguable that anyone who gets to the level of using
matrices directly will want radians since most math requires and or returns
radians. dot, acos, asin, atan, sin, cos, etc, etc,etc...  Anyone working
with CSS-Shaders will also likely end up needing radians.







>
> Dean
>
> I ask because it seems silly to take the dot product of 2 vectors and have
> to convert to degress before I can use the answer. I'm sure people better
> at math can name a bunch of other cases.  How about 2 functions,
> rotateAxisAngleDegress and rotateAxixAngleRadians. I suppose with either
> one you can write a quick wrapper to produce the other, it just seems wrong
> to pick the less efficient one when the whole point of this API is speed
> (otherwise just do everything in JS)
>
>
>
Received on Sunday, 29 January 2012 23:59:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 29 January 2012 23:59:14 GMT