文件名称:ExpandingRods
介绍说明--下载内容均来自于网络,请自行研究使用
题意:已知一个圆的弦长l0及这条弦所在的弧长l1,求弦的中心点到弧的中心点的距离
思想:这是一个列方程然后利用二分法解方程的题目,令该疑弧所对的圆心角为anlg,
半径为r,根据题意有两个方程:l1=anlg*r l0=2*r*sin(anlg/2) 两个方程两个未知数,
通过化简有:2*l1*sin(anlg/2)-anlg*l0=0 因为角度的值是从0到2*pi,题目中讲到过
弧的长度不可能大于弦的两倍,所以角度不可能取到2*pi,但是有可能为0,把零特殊考虑,
再从0到2*pi间二分找解就不会出错了!但是要注意精度问题,取七位小数才能得出正确解.-Italian title: Known l0 chord of a circle and arc length of this string where l1, seeking the center of the arc chord distance of the center of thought: This is a solution out equations and then use the dichotomy of the title equation, so that The arc of the doubt on the central angle for the anlg, radius r, according to the meaning of problems with two equations: l1 = anlg* r l0 = 2* r* sin (anlg/2) two equations two unknowns, by simplification are: 2* l1* sin (anlg/2)-anlg* l0 = 0 because the value of the angle is from 0 to 2* pi, the title referred to had not greater than the arc length of the string twice, So can not get to the point of 2* pi, but there may be 0, to zero special consideration, and then from 0 to 2* pi to find solution between the two points will not be wrong! but to pay attention to accuracy problems, were taken to seven decimal the correct solution.
思想:这是一个列方程然后利用二分法解方程的题目,令该疑弧所对的圆心角为anlg,
半径为r,根据题意有两个方程:l1=anlg*r l0=2*r*sin(anlg/2) 两个方程两个未知数,
通过化简有:2*l1*sin(anlg/2)-anlg*l0=0 因为角度的值是从0到2*pi,题目中讲到过
弧的长度不可能大于弦的两倍,所以角度不可能取到2*pi,但是有可能为0,把零特殊考虑,
再从0到2*pi间二分找解就不会出错了!但是要注意精度问题,取七位小数才能得出正确解.-Italian title: Known l0 chord of a circle and arc length of this string where l1, seeking the center of the arc chord distance of the center of thought: This is a solution out equations and then use the dichotomy of the title equation, so that The arc of the doubt on the central angle for the anlg, radius r, according to the meaning of problems with two equations: l1 = anlg* r l0 = 2* r* sin (anlg/2) two equations two unknowns, by simplification are: 2* l1* sin (anlg/2)-anlg* l0 = 0 because the value of the angle is from 0 to 2* pi, the title referred to had not greater than the arc length of the string twice, So can not get to the point of 2* pi, but there may be 0, to zero special consideration, and then from 0 to 2* pi to find solution between the two points will not be wrong! but to pay attention to accuracy problems, were taken to seven decimal the correct solution.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ExpandingRods.cpp