W3C home > Mailing lists > Public > www-style@w3.org > February 2012

[css3-transforms] Pseudo code for matrix decomposing

From: Dirk Schulze <dschulze@adobe.com>
Date: Tue, 14 Feb 2012 10:03:23 -0800
To: "www-style@w3.org CSS" <www-style@w3.org>
Message-ID: <247B7AA7-5DF9-4DC7-8ED3-69449B97D784@adobe.com>

At the moment the CSS Transforms specification (http://dev.w3.org/csswg/css3-transforms/) provides some pseudo code to decompose 4x4 matrices. The decomposing is needed for transitions and animations of transforms. The current code uses euler angles for rotate. This might be easier to understand. Nevertheless, the WebKit implementation uses quaternion[1][2] for decomposing. Quaternion is another number system that extends the complex numbers. It helps avoiding some mathematical singularities like the hairy ball theorem[1].

Should the CSS Transform specification add a normative section that implementations should use quaternion? Should the pseudo code get updated with a maybe more complex quaternion version? Should the animation section get updated how to deal with quaternion?


[1] http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h#L258
[2] http://en.wikipedia.org/wiki/Quaternion
[3] http://en.wikipedia.org/wiki/Hairy_ball_theorem
Received on Tuesday, 14 February 2012 18:03:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:12 UTC