[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]

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? 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?

Non of the tested implementations scale the rect for the second example. I think this is incorrect from the mathematical point of view. 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.

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 Saturday, 26 May 2012 16:56:57 UTC