- From: Cyril Concolato <cyril.concolato@telecom-paristech.fr>
- Date: Thu, 31 May 2012 22:35:19 +0200 (CEST)
- To: Dirk Schulze <dschulze@adobe.com>
- Cc: SVG public list <www-svg@w3.org>, public-fx@w3.org

Hi Dirk, See my comment inline. ----- Mail original ----- De: "Dirk Schulze" <dschulze@adobe.com> À: "SVG public list" <www-svg@w3.org>, public-fx@w3.org Envoyé: Samedi 26 Mai 2012 18:56:27 Objet: [css3-transforms] neutral element for addition - by animation Hi SVG folks, I have a question to by animations on transforms. See the simple example here: <rect width="100" height="100"> <animateTransform attributeName="transform" attributeType="XML" type="scale" by="1" dur="5s" fill="freeze"/> </rect> This example scales from 0 to 1, since the neutral element for scale is 0. This is relevant because of the definition in SMIL Animation: "" Normative: A by animation with a by value vb is equivalent to the same animation with a values list with 2 values, the neutral element for addition for the domain of the target attribute (denoted 0) and vb, andadditive="sum". Any other specification of the additive attribute in a by animation is ignored. "" [1] [CC] Adding 1 in the scale transformation means going from scale(X) to scale(X+1), therefore the neutral element is scale(0) which is the identity matrix. And according to SVG animation, the animated transform gets post multiplied to the userspace transform of the element (which is the identity matrix). My question is the following: Every transform function (independent if translate, scale or rotate) is just a shorthand for the underlaying transformation matrix (3x3/(3x2) or 4x4). Therefore, shouldn't the neutral element for addition on every transform function be the null matrix? If that is the case, what happens for the following example: <rect width="100" height="100"> <animateTransform attributeName="transform" attributeType="XML" type="translate" by="100,100" dur="5s" fill="freeze"/> </rect> Shouldn't the neutral element here be the zero matrix? [CC] No. Adding 100,100 to a translate means going from translate(tx,ty) to translate(tx+100,ty+100), therefore the neutral element is translate(0) which is also the identity matrix. And shouldn't it mean that at the beginning of the animation the userspace transform gets post multiplied by this null matrix and therefore the element gets invisible? And as a consequence, shouldn't the element scale from 0 to 1 and translate from 0 to 100 at the same time? [CC] No. Non of the tested implementations scale the rect for the second example. I think this is incorrect from the mathematical point of view. [CC] No, I think they interpret it as I indicated. Of course it is also possible to define the neutral element for every single transform function. But then the null element doesn't really make sense for me. [CC] The neutral element is the identity matrix for transformation 'addition' (i.e. composition). It works for scale, rotate, translate, skew ... Cyril I prefixed the subject with [css3-transforms] since I want to specify it in CSS3 transforms and believe that the current definition is incorrect [2]. Greetings, Dirk [1] http://www.w3.org/TR/SMIL3/smil-animation.html#q34 [2] http://dev.w3.org/csswg/css3-transforms/#neutral-element

Received on Thursday, 31 May 2012 20:35:56 UTC