วงกลมที่จารึกไว้ในรูปสี่เหลี่ยมขนมเปียกปูนสัมผัสด้านทั้งสี่ด้านสี่ด้าน ด้านของรูปสี่เหลี่ยมขนมเปียกปูนจะสัมผัสกับวงกลม

ในที่นี้ r คือรัศมีที่จะพบโดยใช้ a และ เส้นทแยงมุมที่มีค่าที่กำหนด
ตอนนี้พื้นที่ของสามเหลี่ยม AOB =½ * OA * OB =½ * AB * r (ทั้งคู่ใช้สูตร ½*b*h)
½ *a/2*b/2 =½ *( √ (a 2 /4 + b 2 /4))*r
a*b/8 =√ (a 2 + b 2 )*r /4
r =a*b/ 2√ (a 2 + b 2 )
พื้นที่วงกลม =π*r*r =π*(a 2 *b 2 )/4(a 2 + b 2 )
ตัวอย่าง
เส้นทแยงมุมของรูปสี่เหลี่ยมขนมเปียกปูน 5 และ 10
พื้นที่ 15.70000
โค้ดตัวอย่าง
#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