想法的算法用于在正方形随机分布圆正方形、算法、想法

由网友(容嬷嬷也用苏菲。)分享简介:我正在寻找一个概念,在随机正方形分布圈,使他们不重叠。各界的大小相同的。覆盖的圆的面积可以很高,高达约的理论最大90%的平方(它们被完全有序的)的。关于200圈应该放在我想正是指定圈数。 (该分配需要作为输入的模型生成一个有限元分析的,顺便说一句)I am searching for a concept to dis...

我正在寻找一个概念,在随机正方形分布圈,使他们不重叠。各界的大小相同的。覆盖的圆的面积可以很高,高达约的理论最大90%的平方(它们被完全有序的)的。关于200圈应该放在我想正是指定圈数。 (该分配需要作为输入的模型生成一个有限元分析的,顺便说一句)

I am searching for a concept to distribute circles in a square randomly, so that they dont overlap. All circles are of the same size. The area covered by the circles can be high, up to the theoretical maximum of ca. 90 % of the square (in which they are completely ordered). About 200 circles should be placed and I want to specify the number of circles exactly. (The distribution is needed as input for a model generation of a FE-analysis, btw)

通过一个直接的算法,它在一个自由点放置圆圈顺序,它不可能覆盖超过约54%,这是不令人吃惊,因为在某些点也只是没有剩余空间。因此previous SO-线程并没有真正涵盖了我的问题(越来越接近:Placing随机界没有重叠(和不使用暴力)?)

With a straight-forward algorithm that places circles sequentially on a free spot, it is not possible to cover more than about 54%, which is not a surprise, as at some point there is just no space left. Therefore previous SO-threads do not really cover my issue (getting close: Placing random circles without overlap (and without using brute force)?)

通过一个简单的随机位移圈的有序集合的圆,分布似乎是没有足够的随机。

With a simple random displacement of the circles of an ordered set of circles, the distribution seems to be "not random enough".

所有的概念,我想出了到目前为止,觉得无论是复杂或穷举式。予最喜欢的方法是确定在其上的下圆可以放置所有可能位置,使得遗留空间是大到足以放置剩余圆。然后选择这些位置中的一个随机等。但是:确定遗留空间的容量,是不容易的,数值上非常复杂。我真的不知道该怎么做,以及它是否能以合理的数值的努力来完成。

All concepts, I came up with so far, feel either to complicated or to brute-force-style. The approach I like most is to determine all possible positions on which the next circle can be placed, so that the left-over space is big enough to place the remaining circles. Then pick one of these positions randomly and so on. But: To determine the "capacity" of the left-over space is not easy and numerically very complex. I dont really know how to do it, and whether it can be done with reasonable numerical effort.

第二个想法是一个台球模拟:将社会各界的任何模式和模拟一个大水池台球。 pretty的蛮力和数字非常昂贵的为好。我有点害怕descretization问题也是如此。

Second idea is a billard simulation: Place all circles in a whatever pattern and simulate a big pool billard. Pretty brute force and numerically very costly as well. I am a bit afraid of descretization issues as well.

数3是多个数学和基于限定势场为每圈具有随机的强度,使有某种所述圈之间的引力和计算的平衡状态。这个数学模型的发展是不平凡的,并会是一个相当任务......

Number 3 is more mathematical and is based on defining a potential field for every circle with a random "strength", so that there is some kind of gravitation between the circles and calculate the equilibrium state. The development of a mathematical model for this is not trivial and would be quite a mission...

所以 - 终于 - 这样的问题:你有什么建议来解决这个问题,leightweight的可能吗?你知道的算法,我应该看看,以解决此问题?什么是你的话,以我的想法?

So - finally - the question: What are your suggestions to solve the problem as leightweight as possible? Do you know algorithms I should look at to solve this? What are your remarks to my ideas?

感谢您事先都不少!我兴奋地阅读你的答案。

Thank you all a lot in advance! I am excited to read your answers.

推荐答案

通过启动basic算法来绘制多达不冲突可能圈子。当它完成时(并且它不能达到200圆),开始推动在圆。我的意思是身体上推动他们在物理引擎: http://www.sgtconker.com/2010/ 09 /条,XNA-先知平台 - 物理学教程/ (不使用重力)。

Start by using the basic algorithm to draw as many as possible circles that don't collide. When it finishes (and it can't reach 200 circles), start pushing in circles. I mean physically push them in with a physics engine: http://www.sgtconker.com/2010/09/article-xna-farseer-platform-physics-tutorial/ (without using gravity).

阅读全文

相关推荐

最新文章