简体   繁体   English

极坐标科学中的积分功能

[英]Integrate function in polar coordinates sciPy

For example, I have a function, defined in polar coordinates, it may be something like this: 例如,我有一个用极坐标定义的函数,它可能是这样的:

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

How can I find, for example,length of ellipse line in sciPy? 例如,如何找到sciPy中的椭圆线长度?

Great thanks in advance. 预先非常感谢。

Seems like you want to calculate an arc length . 好像您要计算弧长 If you are only looking at ellipses, the solution is known and you could utilize SciPy's scipy.special.ellipeinc() or SymPy's elliptic_k() function. 如果仅查看椭圆,则解决方案是已知的 ,您可以利用SciPy的scipy.special.ellipeinc()或SymPy的elliptic_k()函数。

If you are interested in a more general approach, the choice of your integration scheme may vary depending on the properties of your functions. 如果您对更通用的方法感兴趣,则可以根据函数的属性来选择集成方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM