To use the calculator, the user enters the circumradius and the number of sides of the regular polygon. The calculator calculates the area of the regular polygon and the area of the circumcircle, and displays them for comparison.
The area of a regular polygon is the sum of the areas of the triangles it contains.
The area of a triangle is
where a and b are triangle sides, and γ is the angle between those sides.
For the triangle which is a part of a regular polygon, each side is a circumradius, and γ is 360/n, where n is the number of sides.
Thus area of polygon is
The area of the circumcircle calculates as