5 ms·
Just wondering why they needed a new modelling technique with a fancy name, when if you're going to do it numerically anyway (despite the simplifying concentric
by doubleunplussed 8y ago
Just wondering why they needed a new modelling technique with a fancy name, when if you're going to do it numerically anyway (despite the simplifying concentric circles assumption), it's just a double integral:
import numpy as np
from scipy.integrate import dblquad
pi = np.pi
def av_distance(r1, r2):
def distance(theta1, theta2):
z1 = r1 * np.exp(1j * theta1)
z2 = r2 * np.exp(1j * theta2)
return abs(z2 - z1)
integral, err = dblquad(distance, 0, 2*pi, 0, 2*pi)
return 1 / (4 * pi ** 2) * integral
print(av_distance(1, 0.723332))
print(av_distance(1, 0.387098))
...
1.063544409973366
1.0156870128527526
Edit: Oh I see - they did it analytically, and reduced it to a 1D integral even by symmetry. That's cool, but I was thrown out when skimming because they said "we devised the point-circle method" instead of "we did the integral".