This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15960 - Use euler angles or quaternions to decompose matrices
Summary: Use euler angles or quaternions to decompose matrices
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dirk Schulze
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
: 14608 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-12 00:27 UTC by Dirk Schulze
Modified: 2012-05-24 20:30 UTC (History)
6 users (show)

See Also:


Attachments

Description Dirk Schulze 2012-02-12 00:27:25 UTC
With copying the code from FX Transforms, I might have open a concern from Boris. I will check this:

"In section 7.4 of the current 2d transforms editor's draft (no public 
version of this, so no link, sorry), there is a bunch of text that seems 
to be defining what to do in terms of 3d transforms.  Or so I assume. 
It doesn't actually say what the notation it's using means.

In any case, I suspect that using the first Euler angle to rotate in all 
three directions is just wrong.

-Boris"

http://lists.w3.org/Archives/Public/www-style/2011Apr/0467.html

Note: The section number is not correct anymore.
Comment 1 Dirk Schulze 2012-02-14 18:56:00 UTC
The pseudo code in the spec uses euler angles for getting the rotation. Implementations seem to use quaternions to work around singularities with euler. Should we follow implementations? Should animations and transitions get updated as well?

See discussions:

http://lists.w3.org/Archives/Public/www-style/2011Aug/0652.html 
http://lists.w3.org/Archives/Public/www-style/2011Aug/0653.html
http://lists.w3.org/Archives/Public/www-style/2011Aug/0665.html

and

http://lists.w3.org/Archives/Public/www-style/2012Feb/0575.html
Comment 2 Dirk Schulze 2012-02-15 04:06:35 UTC
All people I spoke with agree that we should use quaternions on the pseudo code. At least the code of WebKit and Mozilla seem to follow: http://lists.w3.org/Archives/Public/www-style/2011Aug/0652.html

So I will try to add this to the spec. Simon: looks like you were right with [1] ;)


[1] https://twitter.com/smfr/status/169494444968648704
Comment 4 Dirk Schulze 2012-04-24 22:41:37 UTC
I am looking at this at the moment.

I suggest that we mention that the decomposing can be done by using quaternions and give a short description of why using quaternions (just one sentence). After that it just references some books or sites that describe quaternions.

I'd remove the code itself and just link to the pseudo code. We maintain this pseudo code and put it into the spec directory.  The pseudo code will be using the code from Mozilla and Webkit (they don't differ a lot anyway).

Any concerns?
Comment 5 Dirk Schulze 2012-05-09 12:41:15 UTC
*** Bug 14608 has been marked as a duplicate of this bug. ***
Comment 6 Dirk Schulze 2012-05-24 20:30:30 UTC
The interpolation code uses quaternions now.