Given an integer R which denotes the radius of a circle, the task is to find the area of an equilateral triangle inscribed in this circle.
Input: R = 4
Area of equilateral triangle inscribed in a circle of radius R will be 20.784, whereas side of the triangle will be 6.928
Input: R = 7
Area of equilateral triangle inscribed in a circle of radius R will be 63.651, whereas side of the triangle will be 12.124
Approach: Let the above triangle shown be an equilateral triangle denoted as PQR.
- The area of the triangle can be calculated as:
Area of triangle = (1/2) * Base * Height
- In this case, Base can be PQ, PR or QR and The height of the triangle can be PM. Hence,
Area of Triangle = (1/2) * QR * PM
- Now Applying sine law on the triangle ORQ,
RQ OR ------ = ------- sin 60 sin 30 => RQ = OR * sin60 / sin30 => Side of Triangle = OR * sqrt(3) As it is clearly observed PM = PO + OM = r + r * sin30 = (3/2) * r
- Therefore, the Base and height of the required equilateral triangle will be:
Base = r * sqrt(3) = r * 1.732 Height = (3/2) * r
- Compute the area of the triangle with the help of the formulae given above.
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.
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Area of circle which is inscribed in equilateral triangle
- Radii of the three tangent circles of equal radius which are inscribed within a circle of given radius
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- Maximum area of rectangle inscribed in an equilateral triangle
- Maximum count of Equilateral Triangles that can be formed within given Equilateral Triangle
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Area of a square inscribed in a circle which is inscribed in 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
- Biggest Square that can be inscribed within an Equilateral triangle
- Largest hexagon that can be inscribed within an equilateral triangle
- Count of distinct rectangles inscribed in an equilateral triangle
- Radius of the inscribed circle within three tangent circles
- Program to calculate area and perimeter of equilateral triangle
- Program to calculate area of Circumcircle of an Equilateral Triangle
- Program to calculate the Area and Perimeter of Incircle of an Equilateral Triangle
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.
Improved By : 29AjayKumar