菱形内切圆面积?
内切菱形的圆触及它的四条边和四个角。菱形的边是圆的切线。

此处,r 是半径,需要使用给定值的 a 和对角线的值进行求解。
现在,三角形 AOB 的面积 = ½ * OA * OB = ½ * AB * r(两者都使用公式 ½*b*h)。
½ *a/2*b/2 = ½ *( √ (a2/4 + b2/4))*r
a*b/8 = √ (a2+ b2 )*r /4
r = a*b/ 2√ (a2+ b2 )
圆的面积 = π*r*r = π*(a2*b2)/4(a2+ b2 )
示例
菱形的对角线为 5 和 10。
面积为 15.700000
示例代码
#include <stdio.h>
int main(void) {
int a = 5; int b= 10;
float pie = 3.14;
float area = (float)((pie*a*a*b*b)/(4*((a*a)+(b*b))));
printf("The area of circle inscribed in the rhombus of diagonal %d and %d is %f",a,b,area);
return 0;
}输出
The area of circle inscribed in the rhombus of diagonal 5 and 10 is 15.700000
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP