def conferenceWakeOverlap_bk(X, Y, R):
from math import atan, tan, cos
n = np.size(X)
# theta = np.zeros((n, n), dtype=np.float) # angle of wake from fulcrum
f_theta = np.zeros((n, n), dtype=np.float) # smoothing values for smoothing
for i in range(0, n):
for j in range(0, n):
if X[i] < X[j]:
z = R/tan(0.34906585)
theta = atan(Y[j] - Y[i]) / (X[j] - X[i] + z)
if -0.34906585 < theta < 0.34906585:
f_theta[i][j] = (1 + cos(9*theta))/2
# print f_theta
return f_theta
评论列表
文章目录