Re: animateTransform nad by-transformation

On 04/05/2010 09:58 AM, Dr. Olaf Hoffmann wrote:
 > by-animations are defined (SMIL) to be equivalent to the related
 > values-animations.
 > No matter, about what it is and whether additive is noted or not, this 
means,
 >
 > by="1" is equivalent to values="0;1" additive="sum".

No, that's not true. "by" is supposed to add onto the underlying value, 
not onto "0". Consider e.g.
<svg xmlns="http://www.w3.org/2000/svg">
  <rect x="100" y="100" width="50" height="50">
    <animate attributeName="x" by="20" dur="2s"/>
  </rect>
</svg>

Here, |by="20"| is equivalent to |values="100;120"| (NOT values="0;20") 
because the underlying value is 100, and we're adding 20 onto it.

Normative definition of by-animation is here:
  http://www.w3.org/TR/2001/REC-smil-animation-20010904/#ByAttribute

Quoting:
=====
Specifying only a by value defines a simple animation in which the 
animation function is defined to offset the underlying value for the 
attribute, using a delta that varies over the course of the simple 
duration, starting from a delta of 0 and ending with the delta specified 
with the by attribute.
=====

In the case of <animateTransform type="scale">, the de-facto underlying 
value is "1".  So, I'd imagine that "by animation" should be offsetting 
that underlying value, *adding* 0 at first and and finally *adding* the 
whole by-value.

~Daniel

On 04/05/2010 09:58 AM, Dr. Olaf Hoffmann wrote:
> Hello,
>
> by-animations are defined (SMIL) to be equivalent to the related
> values-animations.
> No matter, about what it is and whether additive is noted or not, this means,
>
> by="1" is equivalent to values="0;1" additive="sum".
>
> Correspondingly for vectors and lists of numbers or colors, one just
> has to know, what 0 means (the neutral element of addition),
> for colors this is for example #000 or black. Because this seemed
> not to be obvious for some people, this was clarified in relation to SMIL3,
> but there is no conflict with earlier SMILs or SVG.
>
> You don't have to care about animateTransform, animate, the detailed
> meaning of the attribute or the phase of the moon or something like that ;o)
> The author is only in trouble, if the animated attribute is not additive
> (for some attributes or properties this is not defined and by- and
> to-animations are not applicable).
>
> This means especially, that one should not use a by animation, if
> one does not want to start with a scale of 0, one can for example
> use values="1;2". This surprise occurs mainly, because the
> interpretation of the scale type of transform was not defined
> very elegant concerning animation (could have been more
> elegant with an interpretation with as exponential scaling,
> but is now far too late).
>
> Olaf
>
>

Received on Monday, 5 April 2010 17:19:14 UTC