Given a regular polygon of N sides with side length a. The task is to find the area of the Circle which inscribed in the polygon.
Input: N = 6, a = 4 Output: 37.6801 Explanataion:
In this, the polygon have 6 faces and as we see in fig.1 we clearly see that the angle x is 30 degree so the radius of circle will be ( a / (2 * tan(30))) Therefore, r = a√3/2 Input: N = 8, a = 8 Output: 292.81 Explanataion: In this, the polygon have 8 faces and as we see in fig.2 we clearly see that the angle x is 22.5 degree so the radius of circle will be ( a / (2 * tan(22.5))) Therefore, r = a/0.828
Approach: In the figure above, we see the polygon can be divided into N equal triangles. Looking into one of the triangles, we see that the whole angle at the center can be divided into = 360/N
So, angle x = 180/n
Now, tan(x) = (a / 2) * r
So, r = a / ( 2 * tan(x))
So, Area of the Inscribed Circle is,
A = Πr² = Π * (a / (2 * tan(x))) * (a / (2*tan(x)))
Below is the implementation of the above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Polygon with maximum sides that can be inscribed in an N-sided regular polygon
- Regular polygon using only 1s in a binary numbered circle
- Side of a regular n-sided polygon circumscribed in a circle
- Program to find Area of Triangle inscribed in N-sided Regular Polygon
- Area of a n-sided regular polygon with given side length
- Area of a n-sided regular polygon with given Radius
- Area of a circle inscribed in a regular hexagon
- Program to calculate area of inner circle which passes through center of outer circle and touches its circumference
- Area of the circle that has a square and a circle inscribed in it
- Find the area of largest circle inscribed in ellipse
- Area of largest Circle that can be inscribed in a SemiCircle
- Check if given polygon is a convex polygon or not
- Program to find the Interior and Exterior Angle of a Regular Polygon
- Program to find the Circumcircle of any regular polygon
- Program to find the Perimeter of a Regular Polygon
- Length of Diagonal of a n-sided regular polygon
- Apothem of a n-sided regular polygon
- Determine the position of the third person on regular N sided polygon
- Central angle of a N sided Regular Polygon
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.