W3C home > Mailing lists > Public > www-svg@w3.org > March 2007

Re: motion in SVG

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Fri, 23 Mar 2007 13:58:39 +0100
To: www-svg@w3.org
Cc: mr_wojciech@gazeta.pl
Message-Id: <200703231358.40053.Dr.O.Hoffmann@gmx.de>

Hello,

I think, your requirements are currently underspecified.
Rotation about which point - the center of the polygon?
Do you have it or do you know how to calculate it if you
do not know it?
Lets assume in the following, the rotation point is '1,1'.

The easiest way to get a rotation is to use something
like
<animateTransform
	attributeName="transform" 
	type="rotate"
	values="0 1 1;360 1 1"
	dur="10s"
	repeatCount="indefinite" />
as a child element of the polygon element.

Another method is available using 
animateMotion on a path like a circle using
elliptical arc commands  (SVG full only)
and rotate="auto".

To change the path data from the polygon
directly with an animation will not result
exactly in a rotation, even if many values
and keySplines are used for the animation.
Anyway similar behaviour for a symmetrical
polygon is sometimes called a pseudorotation
in group theory, if you use for the animation
as many values as the polygon has corners
and you permute in the next value the first corner
to the last position in the point list 
(respectively for the opposite pseudorotation the
last the last corner to the first position...). 
Received on Friday, 23 March 2007 12:58:03 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:36 GMT