A **polygon** is a closed path formed of a succession of straight line segments joined end to end without crossing.
The line segments are called its **sides**, and the points where they meet its **vertices** (singular, **vertex**).

A polygon with n sides is called an **n-gon**. For particular values of n, there are individual names viz:
3 **triangle**, 4 **tetragon**, **quadrangle** or **quadrilateral**; 5 **pentagon**, 6 **hexagon**, 7 **heptagon**,
8 **octagon**, 9 **enneagon**, 10 **decagon**, 11 **undecagon**, 12 **dodecagon**. In some cases it is also helpful
to use the term **digon** for two superimposed lines, AB and BA, even though we cannot tell them apart.

In everyday language these terms can also be used to describe configurations which, for purposes of geometric precision we may need to
distingush more clearly. We can have a **polygon of points**, that is a set of n distinct points {A, B, C, ...} labelled successively,
no three in succession being in one straight line. Similarly we can have a **polygon of lines**, that is a set of n distinct endless
straight lines {a, b, c, ...} labelled successively, each intersecting with its predecessor and successor, but no three in succession
concurrent. The type of polygon defined above is a **polygonal path**, consisting of all the points common to the n straight-line
segments AB, BC, CD, ... or joining the points ab, bc, cd, ... (where the last may repeat the first). Finally by a **polygonal region**
we understand all the points contained within a closed polygonal path as boundary.

The sum of the **external** angles of a polygon is one cycle (360°), since an arrow carried round it, turned to point forwards
along each stretch of path, eventually returns to the starting point pointing in the same direction as initially.
The sum of the **internal** angles of an n-gon is (n−2)/2 cycles, since the internal angle at a vertex is 1/2 a cycle minus the
external angle there. Thus in terms of degrees the internal angles of an n-gon add to 180°(n−2), i.e. 180° for a triangle,
360° for a tetragon, 540° for a pentagon, 720° for a hexagon, and so on.

A polygon is said to be **equilateral** if all its sides are of the same length, and **equiangular** if the angles between
successive line segments are equal. A polygon that is equiangular and equilateral is called **regular**. In the case of a triangle,
the equiangular and equilateral conditions are equivalent, but for larger polygons all three types can exist.
An equilateral 4-gon is a **rhombus**, an equiangular 4-gon is a **rectangle**, and a regular 4-gon is a **square**.
The internal angle of a regular n-gon is 1/2 – 1/n = (n–2)/2n of a cycle, that is 1/6 = 60° for a regular triangle,
1/4 = 90° for a square, 3/10 = 108° for a pentagon, 1/3 = 120° for a hexagon, 5/14 = 128.57° for a heptagon,
3/8 = 135° for an octagon, 7/18 = 140° for an enneagon, 2/5 = 144° for a decagon, 9/22 = 147.27° for an undecagon,
5/12 = 150° for a dodecagon.

A regular polygon has a **centre** of symmetry. If the length of a side of a regular n-gon is g then its **perimeter** is n.g.
The distance of the center of symmetry from each vertex is called the **circumradius** R, as also are the lines joining vertex and centre.
The distance from the centre to the midpoint of each side is called the **inradius** r. The angle between two circumradii or inradii is
1/n of a cycle. The angle between circumradius and inradius is 1/(2.n) of a cycle. Thus r = R.cos(1/(2.n)) and g/2 = R.sin(1/(2.n).
The perimeter is therefore 2.n.sin(1/(2.n)).R. The area enclosed by the polygon is n.g/2.r = n.sin(1/(2.n)).R.r.
The quantity n.sin(1/(2.n)) which occurs in each of these expressions is the **polygonal constant**, denoted p_{n}.
Thus the perimeter is 2p_{n}R and the area is p_{n}Rr.
For a hexagon p_{n} = 3 exactly.

A regular polygon with many sides is indistinguishable from a **circle**. In this case we omit the number of sides and the polygonal
constant becomes the **circular constant** p = 3.14159... calculated to the appropriate number of decimal points.