n 个半径为“r”的圆的交点面积
问题陈述: 在图表上从(-)无穷大到(+)无穷大绘制“N”个等半径圆。求交点的总面积,即图表上被两个或多个圆覆盖的所有面积。
Prob Statement:
'N' equal radii circles are plotted on a graph from (-)infinity to (+)infinity.Find the total area of intersection I.e all the area on the graph which is covered by two or more circles.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先更正:这些不是圆圈。它们是椭圆(圆形是椭圆的特例,其中 a = b)。您可以计算两个椭圆的交集,因此给定 N 个椭圆,您需要检查每一对椭圆,因此整个运算为 O(n2)(乘以交集运算)。
看一下 椭圆的交集 和 相交椭圆的面积。
编辑:圆的交集是一个更简单的问题,但遵循相同的原则。看看两个圆的交点和圆与圆的交点。
Firstly a correction: these aren't circles. They're ellipses (circles being a special case of ellipses where a = b). You can calculate the intersection of two ellipses so given N ellipses you need to check each pair, so the entire operation is O(n2) (multiplied by whatever the intersection operation is).
Take a look at Intersection of Ellipses and The Area of Intersecting Ellipses.
Edit: the intersection of circles is an easier problem but follows the same principle. Take a look at Intersection Of Two Circles and Circle-Circle Intersection.
最简单(不一定是最快或“最佳”)的编码方法是找到包含所有圆的边界框,然后使用数值随机方法进行积分。
现在,通过聪明,您可以将圆分组并将它们单独装箱,即在多个边界框中工作。甚至可以准确地处理某些特殊情况。
但纯随机方法的优点是易于实现(但可能很慢)。
仅当您乐意获得“近似”(但任意接近正确)答案时,这才是可接受的。
Easiest (not necessarily fastest or "best") way to code is to find the bounding box that contains all circles and then use a numerical stochastic method to integrate.
Now by being smart you can probably group circles and box them separately, i.e work in a number of bounding boxes. And even handle certain special cases exactly.
But a pure stochastic method has the beauty of being easy to implement (but potentially slow).
This is only acceptable if you are happy to have an "approximate" (but arbitrarily close to correct) answer.