Create Regular Polygon By Edge Length

Build a regular polygon with a specific edge length. Transform it via matrices, then re-compute its transformed points. Uses polygon points object, getCTM, and matrixTransform

To accomplish this via matrices uses:
1. A matrix object that holds all transform requests.
2. A transform list attached to the element to be transformed( a polygon in this example).
3. After each transform, consolidate() the transform list into a matrix.
Re-compute its transformed points to screen points using: points object, getCTM, and matrixTransform .
Selecting 'Screen Points', removes the transforms, and builds the polygon with a re-computed list of points.

Edge Length: px. Points:      Transforms:     
SVG Source: