16.2.6 Paced animation and data types

Interpolation between animation 'values' can be done with different methods, specified by the attribute 'calcMode'. One of them 'paced' allows an even pace of change across the animation for values that define a linear numeric range. To achieve such an even pace across the animation, a specific notion of distance is needed to get the desired effect. Interpolation between successive values of the data type of the animated attribute is required as one condition for a paced animation.

Several different notions of distances exist in mathematics for different purposes. Most of these different notions of distance however do not have a meaning related to a paced animation. A distance with a usual meaning is defined for scalars and vectors and therefore a paced animation within its linear numeric range.

A scalar is a single <integer> or <number> (respectively <length>, <coordinate>) with an optional unit. The distance d(a,b) between two scalars a and b is the absolute value of the difference between the two scalars d(a,b):= abs(a - b).

A vector has a direction and an absolute value. In SVG this is for example a <point> noted in <coordinates> as for 'animateMotion' using 'values' or 'animateTransform' of the 'type' 'translate' or 'scale' or a <color> with three components in the color space. As the distance d(A,B) between two vectors A and B the Euclidian distance is used, this is the absolute value of the difference vector d(A,B):= abs(A - B).
If the vector is noted in such n coordinates or components (n = 2 for <point> or n = 3 for <color>) as in SVG Ai, Bi, the Euclidian distance is the square root from the sum over the squares of the differences between the coordinates or components:
d(A,B):=sqrt(sum(for i = 1 to n, (Ai - Bi)^2)).

SVG has more complex types as lists of scalars or vectors or a mixture of such types. For these list types a paced behaviour is undefined and 'calcMode' 'linear' is used instead. The type <PathData> is not related to a scalar or a vector or a list, a paced behaviour is undefined, 'calcMode' 'linear' is used instead here too.

The previous explanations require to distinguish between a vector and a list of scalars (or a list of vectors). As noted above, a vector has a direction and an absolute value, a simple list of scalars does not have a direction or an absolute value.
Especially the attributes 'x' and 'y' and 'rotate' of 'text' or the property 'stroke-dasharray' are lists and not vectors.
The 'points' attribute of 'polygon' or 'polyline' is a list of vectors.
The attribute 'viewBox' is a list of four numbers.
The 'type' 'rotate' of 'animateTransform' is a list of a scalar and an optional vector.

Note, that this definition does not exclude, that authors may find a useful meaning for a paced animation of a list (for example if there is only one list item changing within the animation) and a related notion of distance in a specific situation or that there might be another meaningful behaviour for a scalar or a vector with another notion of distance. Authors can achieve this desired behaviour anyway using 'calcMode' 'linear' and related 'keyTimes' as they can achieve an equivalent animation to a 'paced' behaviour as explained here:

Because paced animations interpolate between the given values, the animation is equivalent to a 'linear' animation using specific 'keyTimes':
If d(a,b) is the distance between two values a, b , then for n>2 successive values v(i), i = 1 to n and D(1):= 0 and D(i>1):= d(v(i-1), v(i)) + D(i-1) the keyTimes for the value v(i)) is D(i)/D(n), if D(n) is not zero . If n<3 or D(n)= 0 no keyTimes are required.

This especially means, that paced and linear animations are equivalent, if the values attribute has not more than two values, including the short forms using only the attributes 'to', 'from', or 'by'. No specific distance calculations are needed for such simple animations.