Regular Polygon
 How to construct an arbitrary regular N-sided polygon, inscribed in a given circle? As stated in the constructions page, there are many regular polygons that cannot be constructed by the ruler-and-compass rule. One example is the heptagon. The given X- and Y-coordinates of the angular points of the heptagon are used to draw it as accurately as needed. This is a special case. In the general case, the X- and Y-coordinates are derived from the cosine and sine of the angle made by the angular point relative to the (positive) horizontal direction. If r denotes the radius of the circle, and N the total number of angular points, then the coordinates of the i-th angular point (i = 0, 1, ..., N-1) are:         X = r * cos (i/N*360°)         Y = r * sin (i/N*360°)With a scientific calculator (for instance the Windows calculator in scientific mode), these values can simply be obtained. As an example, here are the coordinates of a regular 13-sided polygon, inscribed in a circle with radius = 1.0000, and pointing to the right (calculator in the "DEG"-mode): i i/N*360° X Y 0 0.0000° 1.0000 0.0000 1 27.6923° 0.8855 0.4647 2 55.3846° 0.5681 0.8230 3 83.0769° 0.1205 0.9927 4 110.7692° ñ0.3546 0.9350 5 138.4615° ñ0.7458 0.6631 6 166.1538° -0.9709 0.2393 7 193.8462° ñ0.9709 ñ0.2393 8 221.5385° -0.7458 ñ0.6631 9 249.2308° ñ0.3546 ñ0.9350 10 276.9230° 0.1205 ñ0.9927 11 304.6154° 0.5681 ñ0.8230 12 332.3077° 0.8855 ñ0.4647 As with the heptagon, for different orientations, manipulate x- and y-values, as follows:for the polygon pointing to the left, exchange + and ñ of all valuesfor the polygon pointing up, exchange x- and y-valuesfor the polygon pointing down, do both, exchange + and ñ, and exchange x- and y-valuesIf an arbitrary orientation is needed, where the starting angular point makes an angle say α with the horizontal direction, this angle must be added to the angles given above. In this case, the coordinates of the i-th angular point become:         X = r * cos (i/N*360° + α)         Y = r * sin (i/N*360° + α)The given coordinate values assume a circumscribed circle with radius 1.0000. For polygons of different sizes, multiply all x- and y-values with the desired radius of the circumscribed circle, according to the given formulas for X and Y above.