修复一个十分严重的公式错误

This commit is contained in:
2021-09-20 22:33:11 +08:00
parent 2b898e41db
commit 2ac34196f0
2 changed files with 29 additions and 11 deletions

View File

@@ -141,12 +141,12 @@ def fun_calculus_pw(theta, max_w):
abc = 123
pass
w_samples, d_w = np.linspace(0, max_w, int(max_w / w_fineness) + 1, retstep=True)
for cal_w in w_samples[: -1]:
for cal_w in w_samples[:-1]:
r_pw += (
(
abs(angel_density(cal_w)) * math.sin(theta - cal_w + math.pi)
abs(angel_density(cal_w)) * math.sin(theta - (cal_w - math.pi / 2))
+ abs(angel_density(cal_w + d_w))
* math.sin(theta - cal_w - d_w + math.pi)
* math.sin(theta - (cal_w + d_w - math.pi / 2))
)
/ 2
) * d_w
@@ -154,7 +154,7 @@ def fun_calculus_pw(theta, max_w):
def calculus_bd(theta, rc, rs, rg, dgc, h_cav, h_gav): # 对θ进行积分
max_w=0
max_w = 0
# 求暴露弧上一点的切线
line_x = math.cos(theta) * rc + dgc
line_y = math.sin(theta) * rc + h_cav