- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

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

# Area of a n-sided regular polygon with given Radius?

Here we will see how to get the area of an n-sided regular polygon whose radius is given. Here the radius is the distance from the center of any vertex. To solve this problem, we have drawn one perpendicular from the center to one side. Let each side is of length ‘a’. The perpendicular is dividing the side into two parts. The length of each part is a/2. The perpendicular and one radius is making an angle x. Let the length of the radius is h.

Here we can see that the polygon is divided into N equal triangles. So for any polygon with N sides, will be divided into N triangles. So the angle at the center is 360. That is divided into 360°/N different angles (Here 360°/6 = 60°). So the angle x is 180°/N. Now we can easily get the h and a using trigonometric equations.

Now the area of whole polygon is N*A.

## Example

#include <iostream> #include <cmath> using namespace std; float polygonArea(float r, int n){ return ((r * r * n) * sin((360 / n) * 3.1415 / 180)) / 2; //convert angle to rad then calculate } int main() { float rad = 9.0f; int sides = 6; cout << "Polygon Area: " << polygonArea(rad, sides); }

## Output

Polygon Area: 210.44

- Related Questions & Answers
- Area of a n-sided regular polygon with given Radius in C Program?
- Area of a n-sided regular polygon with given side length in C++
- Apothem of a n-sided regular polygon 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?
- Area of a polygon with given n ordered vertices in C++
- Determine the position of the third person on regular N sided polygon in C++?
- Determine the position of the third person on regular N sided polygon in C++ Program
- Find number of diagonals in n sided convex polygon in C++
- Probability that the pieces of a broken stick form a n sided polygon in C++
- Program to find area of a polygon in Python
- Check if it is possible to create a polygon with given n sidess in Python
- Area of a circle inscribed in a regular hexagon?
- Program to find the Circumcircle of any regular polygon in C++
- Check if a given point lies inside a Polygon