- Related Questions & Answers
- Area of a n-sided regular polygon with given Radius?
- Area of a n-sided regular polygon with given side length in C++
- Area of largest Circle inscribed in N-sided Regular polygon in C Program?
- Area of largest Circle inscribe in N-sided Regular polygon in C Program?
- Apothem of a n-sided regular polygon in C++
- Area of a polygon with given n ordered vertices in C++
- Find number of diagonals in n sided convex polygon in C++
- Area of hexagon with given diagonal length in C Program?
- Program to find the Circumcircle of any regular polygon in C++
- C Program for area of hexagon with given diagonal length?
- Program to find the Interior and Exterior Angle of a Regular Polygon in C++
- C++ Program to implement Slicker Algorithm that avoids Triangulation to find Area of a Polygon
- C++ Program for Area Of Square after N-th fold
- Minimum height of a triangle with given base and area in C++
- Maximum area of rectangle possible with given perimeter in C++

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

A polygon is a ‘n’ sided closed figure.N sided polygon means a polygon with n equal sides. The radius of a polygon is distance between center and vertex.

In the figure we can see that the whole polygon can be divided into n equal polygon

We know,

area of the triangle = (base * height)/2

Area of the small triangle using trigonometric logic,

area = r2*sin(t)cos(t) = (r2*sin(2t))/2

So, area of the polygon:

Area = n * (area of one triangle)

= n*r^{2}*sin(2t)/2 = n*r^{2}*sin(360/n)/2

#include <stdio.h> #include <math.h> int main() { float r = 4 n = 12; float area = ((r * r * n) * sin((360 / n) * 3.14159 / 180)) / 2; printf("area = %f", area); return 0; }

area = 47.999962

Advertisements