What is a polygon? A polygon is a closed shape made of line segments.
<polygon points=”10,10 28,228 62,184”/>
The points attribute defines each point in the polygon. In the example above there are three sets of X,Y coordinates, so this shape is some sort of triangle. We’re animating the values of the coordinates in this example.
It’s also possible to animate the d attribute of the path element.
<path d=”M10,10L28,228L62,184Z”/ >
The d attribute is not made of X and Y coordinates, but instead is made up of path instructions, like Moveto, Lineto, Curveto, Arcto, and ClosePath. In the above path, the M stands for Moveto, and the first set of instructions for the path is move 46 right and 282 down. The next is L, or Lineto, which tells…