Given here is an equilateral triangle with side length a, which inscribes a circle, which in turn inscribes a square. The task is to find the area of this square.
Input: a = 6 Output: 1 Input: a = 10 Output: 0.527046
let r be the radius of circle,
hence it is the inradius of equilateral triangle, so r = a /(2 * √3)
diagonal of square, d = diameter of circle = 2 * r = a/ √3
So, area of square, A = 0.5 * d * d
hence A = (1/2) * (a^2) / (3) = (a^2/6)
Below is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Area of circle which is inscribed in equilateral triangle
- Area of Equilateral triangle inscribed in a Circle of radius R
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Area of a square inscribed in a circle which is inscribed in a hexagon
- Biggest Square that can be inscribed within an Equilateral triangle
- Maximum area of rectangle inscribed in an equilateral triangle
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Biggest Reuleaux Triangle within a Square which is inscribed within a Circle
- Program to calculate area of an Circle inscribed in a Square
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within a hexagon
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Area of the circle that has a square and a circle inscribed in it
- Largest hexagon that can be inscribed within an equilateral triangle
- Count of distinct rectangles inscribed in an equilateral triangle
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- How to draw Inscribed circle of a triangle using p5.js ?
- Area of decagon inscribed within the circle
- Area of circle inscribed within rhombus
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.