Home  >  Article  >  Backend Development  >  What is the largest square inscribed in an equilateral triangle?

What is the largest square inscribed in an equilateral triangle?

WBOY
WBOYforward
2023-08-29 17:37:051570browse

A planar shape or solid that is inscribedin another geometric shape or solid is enclosed and "fitted tightly" within it. Saying "a square is inscribed in a triangle" means exactly the same thing as "a triangle is circumscribed in a square".

The largest square that can be inscribed in an equilateral triangle−

What is the largest square inscribed in an equilateral triangle?

The largest square that can be inscribed in an equilateral triangle−

Let Let’s take an example,

Input: 5
Output: 2.32

explains that one side of the

square is

x.

Now,

AH is perpendicular to DE.

DE is parallel to BC, angle AED = angle ACB = 60

is in triangle

EFC中,

⇒ Sin60 = x/ EC

⇒ √3 / 2 = x/EC

⇒ EC = 2x/√3

at In triangle

AHE,

⇒ Cos 60 = x/2AE

⇒ 1/2 = x/2AE

⇒ AE = x

Sides of a triangle

AC = 2x/√3 x. Now,

a = 2x/√3 x

x = a/(1 2/√3) = 0.464a

Example

Demonstration

#include <stdio.h>
#include <math.h>
int main() {
   float a = 5;
   float area = 0.464 * a;
   printf("The area is : %f",area);
   return 0;
}

Output

The area is : 2.320000

The above is the detailed content of What is the largest square inscribed in an equilateral triangle?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete