Given a regular polygon of N sides with radius(distance from the center to any vertex) R. The task is to find the area of the polygon.
Input : r = 9, N = 6 Output : 210.444 Input : r = 8, N = 7 Output : 232.571
In the figure, we see that the polygon can be divided into N equal triangles.
Looking into one of the triangles, we see that the whole angle at the centre can be divided into = 360/N parts.
So, angle t = 180/N.
Looking into one of the triangles, we see,
h = rcost a = rsint
area of the triangle = (base * height)/2 = r2sin(t)cos(t) = r2*sin(2t)/2
So, area of the polygon:
A = n * (area of one triangle) = n*r2*sin(2t)/2 = n*r2*sin(360/n)/2
Below is the implementation of the above approach:
- Area of a n-sided regular polygon with given side length
- Apothem of a n-sided regular polygon
- Regular polygon using only 1s in a binary numbered circle
- Length of Diagonal of a n-sided regular polygon
- Program to find the Perimeter of a Regular Polygon
- Program to find the Circumcircle of any regular polygon
- Side of a regular n-sided polygon circumscribed in a circle
- Program to find the Interior and Exterior Angle of a Regular Polygon
- Minimum area of a Polygon with three points given
- Area of a polygon with given n ordered vertices
- Area of a circle inscribed in a regular hexagon
- Maximize a value for a semicircle of given radius
- Equation of circle from centre and radius
- Number of rectangles in a circle of radius R
- Program to find the Radius of the incircle of the triangle