2014-02-23 39 views
0

例如,我有一個功能,在極座標定義的,它可能是這樣的:整合功能SciPy的

r = a*b/sqrt((b*cos(f)^2) + (a*sin(f))^2) 
# ellipse in polar coordinates, 
# when center of ellipse is polus 
# and bigger axis is polar axis 
# f is angle, r is distance 

我如何才能找到,例如,橢圓形線的長度SciPy的?

非常感謝提前。

回答

3

似乎你想計算一個arc length。如果您只查看橢圓,則解決方案爲known,您可以使用SciPy的scipy.special.ellipeinc()或SymPy的elliptic_k()函數。

如果您對更一般的方法感興趣,您的集成方案的選擇可能會有所不同,具體取決於您的功能屬性。