pi-r-fun.com js svg make_poly()

click here to view svg markup

The above svg graphic is created with a JavaScript function that creates regular polygons.
The function works well with JavaScript loops and trigonometry.
Pass into the svg polygon function the number of sides,x origin,y origin,hypotenuse length,color,rotational offset,and line width.
Most parameters are numbers, fill color and stroke color are string variables.



SVG2 text file    home unit circle