A regular polygon has "n" sides.
Therefore it may be subdivided into "n" isosceles triangles, all meeting at the centre.
The angle at the central apex of each triangle is 360/n degrees.
Subtract that from 180 degrees and divide by 2 to get the other angles "A" of each isosceles triangle.
Take half the length of a side of the polygon.
Use TanA multiplied by half a side length squared to get a triangle area.
"n" of these is the polygon area.