Home > Article > Backend Development > What is the area of the Luer triangle?
Here we will see how to calculate the area of the Reuleaux triangle below. There is an equilateral triangle inside a Reuleaux triangle. Assuming its height is h, this shape is composed of the intersection of three circles.
There are three circular sectors. The area of each sector is −
#Since the area of an equilateral triangle is added three times, we must subtract them. Therefore the final area is −
#include <iostream> #include <cmath> using namespace std; float areaReuleaux(float h) { if (h < 0) //if h is negative it is invalid return -1; float area = ((3.1415 - sqrt(3)) * h * h)/2; return area; } int main() { float height = 6; cout << "Area of Reuleaux Triangle: " << areaReuleaux(height); }
Area of Reuleaux Triangle: 25.3701
The above is the detailed content of What is the area of the Luer triangle?. For more information, please follow other related articles on the PHP Chinese website!