sheep426 发表于 2005-7-22 23:27

[数学题]zju_1439

http://acm.zju.edu.cn/pictures/logo.gif
Area Ratio
Time limit: 1 Seconds   Memory limit: 32768K   
Total Submit: 2432   Accepted Submit: 1166   
To make things easier, WishingBone decides to put this simple geometry problem at the beginning. Given a triangle, what is the ratio of the area of its inscribed circle to that of its circum circle?
http://acm.zju.edu.cn/showimg.php?pid=1439&file=1439.gif
Input
9 integers x1 y1 z1 x2 y2 z2 x3 y3 z3 on one line (-1000
Process to the end of file.
Output
One ratio per line, exact to three digits to the right of the decimal point.
Sample Input
0 0 0 0 0 1 0 1 0
Sample Output
0.172
Submit   Back   Status
Zhejiang University Online Judge V1.0

sheep426 发表于 2005-7-22 23:33

一些公式:
三角形三邊a,b和c,求其面積S的公式列為
S=sqrt(s(s-a)(s-b)(s-c))
其中s=(a+b+c)/2,這就是著名的海頓公式。
除了海頓公式外,由三邊求出三角形的面積公式還有很多,只是海頓公式比較著名而已。例如公元前2世紀希柏克(Hipparchus, BC160-125)曾提出S=abc/4R,其中R是三角形的外接圓半徑。
所以R = abc/4*s
推导过程:
设3边:a,b,c,bc的夹角为x;
所以S=b*c*sinx/2,
然后你画个3角形,和他的外接圆,可求出,sinx=a/2R
所以S=a*b*c/4R

三角形内接圆半径
r = 2 * s/(a+b+c);

小康 发表于 2005-7-23 09:08

GOOD

剑乱 发表于 2005-7-23 13:10

怎么我都不知道有那些公式的???不过我记得那个海伦公式,翻译都行吧。海伦公式=海顿公式吧!

剑乱 发表于 2005-7-23 13:17

三角形内接圆半径
r = 2 * s/(a+b+c);

能说一说这个公式怎么证明或怎么得出来吗?
页: [1]
查看完整版本: [数学题]zju_1439