kingchoice00 发表于 2008-7-18 10:41:00

纯数学 计算旋转体 体积!

<p>'圆方程(x-a)^2+(y-b)^2=c^2的定积分(圆弧绕x轴旋转的体积)<br/>' a b&nbsp; 为圆心坐标,e  f 表示定积分的上下限 我是先显化为 x=f(y)绕x轴旋转的体积<br/>Public Function dingjf(ByRef a As Double, ByRef b As Double, ByRef c As Double, ByRef e As Double, ByRef f As Double)<br/>Dim pi As Double<br/>pi = 4 * Atn(1)</p><p>If a &lt; 0 Then</p><p>&nbsp;&nbsp;&nbsp; dingjf = (f - e) * (pi * (a * a + c * c) - pi * b * b) - (pi / 3#) * ((f - b) * (f - b) * (f - b) - (e - b) * (e - b) * (e - b)) + pi * b * ((f - b) * (f - b) - (e - b) * (e - b)) + 2 * a * pi * (0.5 * (f - b) * Sqr(c * c - (f - b) * (f - b)) + 0.5 * c * c * Arcsin((f - b) / c) - 0.5 * (e - b) * Sqr(c * c - (e - b) * (e - b)) + 0.5 * c * c * Arcsin((e - b) / c))<br/>Else<br/>&nbsp;&nbsp;&nbsp;&nbsp; dingjf = (f - e) * (pi * (a * a + c * c) - pi * b * b) - (pi / 3#) * ((f - b) * (f - b) * (f - b) - (e - b) * (e - b) * (e - b)) + pi * b * ((f - b) * (f - b) - (e - b) * (e - b)) - 2 * a * pi * (0.5 * (f - b) * Sqr(c * c - (f - b) * (f - b)) + 0.5 * c * c * Arcsin((f - b) / c) - 0.5 * (e - b) * Sqr(c * c - (e - b) * (e - b)) + 0.5 * c * c * Arcsin((e - b) / c))<br/>End If<br/>End Function<br/>'反正炫函数<br/>Public Function Arcsin(ByRef x As Double)<br/>Arcsin = Atn(x / Sqr(-x * x + 1))<br/>End Function<br/></p><p>计算结果不对,帮忙分析分析</p>
页: [1]
查看完整版本: 纯数学 计算旋转体 体积!