Description Available Attribute Values Path-Data Details Animatable Used by the Elements
Governs the path of the animated motion.
The value is a path-data description and is expressed in either one of the following ways.
Specifies the path of motion as a named list, using the path-data format with list names drawn from the path commands (M, m, Z, z, L, l, H, h, V, v) and values being the points for which those commands are to operate on.
Specifies the path of the motion as a vector; using the path-data format built from path commands (M, m, Z, z, L, l, H, h, V, v) and values being the points for which those commands are to operate on.
Path-data is a description consisting of a collection of pairs of path commands and values.
Path-data is be represented in one of two ways, either as an named list or as a vector.
In the named list representation, the names are letters-tokens for commands and the corresponding values play the role of the parameters for those commands.
list(M=c(100,100), L=c(200,200), h=10, Z=NULL)
In the vector representation, each name is a letter-token (of class character) followed by the corresponding values, again playing the role of the parameters for those commands.
c('M', c(100,100), 'L', c(200,200), 'h', 10, 'Z')
In the following we write pt for a point c(x,y).
Path Data Command Table
Name | Values | Interpetion |
'M','m' | pt+ | Move the current point to a new location (without drawing) |
'L','l' | pt+ | Draw a line from the current point to pt |
'H','h' | (x)+ | Draw a horizontal line from the current point |
'V','v' | (y)+ | Draw a vertical line from the current |
'C','c' | c(pt1,pt2,pt)+ | Draw a cubic Bezier curve to pt with control points pt1,pt2, (x2,y2) |
'S','s' | c(pt2,pt))+ | Draw a cubic Bezier to pt using pt2 as the second control pt (inheriting the first control point from a preceding Bezier) |
'Q','q' | c(pt1,pt))+ | Draw a quadratic Bezier to pt using pt1 as the control pt |
'T','t' | pt+ | Draw a quadratic Bezier curve to pt (inheriting the control from a preceding Bezier) |
'A','a' | c(rxy, theta, LargeArc, SweepRight, pt) | Draw an arc the current point to the point pt, based on an ellipse of radii rxy, rotated by θ degrees. |
Use 1 or 0 for TRUE or FALSE in the LargeArc, SweepRigh flags | ||
'Z','z' | Closes the Path |
Note:
Each name is denoted by a single letter
Names can be repeated in the list (or vector)
Names with upper-case letters indicate the coordinate values are interpreted to be absolute.
Names with lower-case letters indicate the coordinate values are interpreted to be relative.
Z (or z), the command that closes the path, takes no value in the vector form, and in list form the value is ignored.
Not Animatable
animateMotion
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.