# Biggest Reuleaux Triangle within a Square which is inscribed within a Circle

Given here is a circle of radius **r**, which inscribes a square which in turn inscribes a reuleaux triangle. The task is to find the maximum possible area of this reuleaux triangle.

**Examples:**

Input:r = 6Output:50.7434Input:r = 11Output:170.554

**Approach**: From the figure, it is very clear that, if the side of the square is **a**, then

a√2 = 2r

a = √2r

Also, in reuleaux triangle, **h = a = √2r**, please refer Biggest Reuleaux Triangle within A Square.

So, Area of the Reuleaux Triangle is, **A = 0.70477*h^2 = 0.70477*2*r^2**

## C++

`// C++ Program to find the biggest Reuleaux ` `// triangle inscribed within in a square which ` `// in turn is inscribed within a circle ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` ` ` `// Function to find the Area ` `// of the Reuleaux triangle ` `float` `ReuleauxArea(` `float` `r) ` `{ ` ` ` ` ` `// radius cannot be negative ` ` ` `if` `(r < 0) ` ` ` `return` `-1; ` ` ` ` ` `// Area of the Reuleaux triangle ` ` ` `float` `A = 0.70477 * 2 * ` `pow` `(r, 2); ` ` ` ` ` `return` `A; ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `float` `r = 6; ` ` ` `cout << ReuleauxArea(r) << endl; ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java Program to find the biggest Reuleaux ` `// triangle inscribed within in a square which ` `// in turn is inscribed within a circle ` `import` `java.util.*; ` ` ` `class` `GFG ` `{ ` ` ` `// Function to find the Area ` `// of the Reuleaux triangle ` `static` `double` `ReuleauxArea(` `double` `r) ` `{ ` ` ` ` ` `// radius cannot be negative ` ` ` `if` `(r < ` `0` `) ` ` ` `return` `-` `1` `; ` ` ` ` ` `// Area of the Reuleaux triangle ` ` ` `double` `A = ` `0.70477` `* ` `2` `* Math.pow(r, ` `2` `); ` ` ` ` ` `return` `A; ` `} ` ` ` `// Driver code ` `public` `static` `void` `main(String args[]) ` `{ ` ` ` `double` `r = ` `6` `; ` ` ` `System.out.println(ReuleauxArea(r)); ` ` ` `} ` `} ` `// This code is contributed by ` `// Surendra_Gangwar ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 Program to find the biggest ` `# Reuleaux triangle inscribed within ` `# in a square which in turn is inscribed ` `# within a circle ` `import` `math as mt ` ` ` `# Function to find the Area ` `# of the Reuleaux triangle ` `def` `ReuleauxArea(r): ` ` ` ` ` `# radius cannot be negative ` ` ` `if` `(r < ` `0` `): ` ` ` `return` `-` `1` ` ` ` ` `# Area of the Reuleaux triangle ` ` ` `A ` `=` `0.70477` `*` `2` `*` `pow` `(r, ` `2` `) ` ` ` ` ` `return` `A ` ` ` `# Driver code ` `r ` `=` `6` `print` `(ReuleauxArea(r)) ` ` ` `# This code is contributed by ` `# Mohit kumar 29 ` |

*chevron_right*

*filter_none*

## C#

`// C# Program to find the biggest Reuleaux ` `// triangle inscribed within in a square which ` `// in turn is inscribed within a circle ` `using` `System; ` ` ` `class` `GFG ` `{ ` ` ` `// Function to find the Area ` `// of the Reuleaux triangle ` `static` `double` `ReuleauxArea(` `double` `r) ` `{ ` ` ` ` ` `// radius cannot be negative ` ` ` `if` `(r < 0) ` ` ` `return` `-1; ` ` ` ` ` `// Area of the Reuleaux triangle ` ` ` `double` `A = 0.70477 * 2 * Math.Pow(r, 2); ` ` ` ` ` `return` `A; ` `} ` ` ` `// Driver code ` `public` `static` `void` `Main() ` `{ ` ` ` `double` `r = 6; ` ` ` `Console.WriteLine(ReuleauxArea(r)); ` `} ` `} ` ` ` `// This code is contributed by ` `// shs.. ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP Program to find the biggest Reuleaux ` `// triangle inscribed within in a square ` `// which in turn is inscribed within a circle ` ` ` `// Function to find the Area of the ` `// Reuleaux triangle ` `function` `ReuleauxArea(` `$r` `) ` `{ ` ` ` ` ` `// radius cannot be negative ` ` ` `if` `(` `$r` `< 0) ` ` ` `return` `-1; ` ` ` ` ` `// Area of the Reuleaux triangle ` ` ` `$A` `= 0.70477 * 2 * pow(` `$r` `, 2); ` ` ` ` ` `return` `$A` `; ` `} ` ` ` `// Driver code ` `$r` `= 6; ` `echo` `ReuleauxArea(` `$r` `) . ` `"\n"` `; ` ` ` `// This code is contributed by ita_c ` `?> ` |

*chevron_right*

*filter_none*

**Output:**

50.7434

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.

## Recommended Posts:

- Biggest Reuleaux Triangle inscribed within a square which is inscribed within a hexagon
- Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Biggest Reuleaux Triangle inscirbed within a square inscribed in a semicircle
- Biggest Reuleaux Triangle within A Square
- Biggest Square that can be inscribed within an Equilateral triangle
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle
- Radius of the biggest possible circle inscribed in rhombus which in turn is inscribed in a rectangle
- The biggest possible circle that can be inscribed in a rectangle
- Largest square that can be inscribed within a hexagon which is inscribed within an equilateral triangle
- Area of a square inscribed in a circle which is inscribed in a hexagon
- Area of the circle that has a square and a circle inscribed in it
- Area of circle which is inscribed in equilateral triangle
- Area of Equilateral triangle inscribed in a Circle of radius R
- Program to calculate area of an Circle inscribed in a Square
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Area of Reuleaux Triangle
- Area of the biggest ellipse inscribed within a rectangle

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. 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.