Home > Backend Development > C++ > body text

What is the area of ​​a circle within a rectangle inscribed in a semicircle?

PHPz
Release: 2023-09-04 23:33:05
forward
1618 people have browsed it

Let us consider a given semicircle. Its radius is R. A rectangle of length l and width b is inscribed in the semicircle. Now, a circle of radius r is inscribed in the rectangle. We must find the area of ​​the inner circle.

What is the area of ​​a circle within a rectangle inscribed in a semicircle?

We know that the length of the largest rectangle inscribed in a semicircle is l and the width is b. Then the equations of l and b are as follows-

What is the area of ​​a circle within a rectangle inscribed in a semicircle?

What is the area of ​​a circle within a rectangle inscribed in a semicircle?

Now, the radius of the largest circle that can be inscribed in the rectangle is r as follows-

What is the area of ​​a circle within a rectangle inscribed in a semicircle?

Example

#include <iostream>
#include <cmath>
using namespace std;
float innerCircleArea(float R){
   return 3.1415 * pow(R / (2 * sqrt(2)), 2);
}
int main() {
   float rad = 12.0f;
   cout << "Area: " << innerCircleArea(rad);
}
Copy after login

Output

Area: 56.547
Copy after login

The above is the detailed content of What is the area of ​​a circle within a rectangle inscribed in a semicircle?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template