我怎样才能创建一个内部螺旋形的多边形?多边形、创建一个、螺旋形

2023-09-11 04:51:11 作者:岛是海心上的疤

有关我怎么能在里面创建一个螺旋形状相似的任何形状。这将是一个类似的想法来包围(使用Minkowski求和)。而不是创建相同的形状里面的造型虽然这将是相同形状的螺旋。

For any shape how can I create a spiral inside it of a similar shape. This would be a similar idea to bounding (using Minkowski sum). Rather than creating the same shape inside the shape though it would be a spiral of same shape.

我发现了这一点 - HTTP://www.cis.upenn埃杜/〜cis110 / 13su /讲座/ Spiral.java

I found this - http://www.cis.upenn.edu/~cis110/13su/lectures/Spiral.java

它创建了一个螺旋式的基础上通过,以便它可以为任何常规形状的参数。

It creates a spiral based on the parameters passed so it can be for any regular shape.

我想上面的所有形状,即不规则多边形了。

I want the above for all shapes i.e. irregular polygons too.

我不是非常熟悉的几何术语,但我已经看过了渐开线和一个内部螺旋搜索算法太多,但一直没对我很有用。

I am not hugely familiar with geometric terminology but I have looked up Involutes and an Internal Spiral Search Algorithm too but haven't been useful to me.

没有人有任何想法,我会找到一个算法,因为这或怎么我会想出一个最低想法?

Does anyone have any idea where I'd find an algorithm such as this or at least ideas of how I'd come up with one?

推荐答案

这个任务我们都知道:很难做到。

this task is extremly hard to do.

需要有边界的多边形要填充用螺旋

need to have the boundary polygon you want to fill with spiral 我认为你有它已经

由步移向内所有行创造新的更小的多边形。

create new smaller polygon by shifting all lines inwards by the step.

在它类似于创建一个围绕多边形笔画线 的步骤是螺旋宽度因此在多边形的起点是0和它到底是 D

删除新生成的螺丝无效行

remove invalid lines from the newly generated screw

在弯道和曲率一些线相交 这是防不胜防/维修可靠 在看到这个为基础 some lines on corners and curvatures will intersect this is very hard to detect/repair reliably see this for basics

重复(下一步螺钉)......直到螺丝没有空间发现

repeat (do next screw) ... until no space for screw found

,但现在第一螺杆后一步总是 D 在此并不一定会填满整个造型 例如,如果您有形状有些薄点 将会更加充满快那么剩下 所以还是可以有一些洞剩 所以你应该发现他们,您认为合适的处理 在看到查找在二维点孔设置 注意检测是否被填充的区域也是不平凡 but now after the first screw the step is always d this will not necessarily fill the whole shape for example if you have some thinner spot on shape it will be filled much more faster then the rest so there can still be some holes left so you should detect them and handle as you see fit see Finding holes in 2d point sets be aware detection if the area is filled is also not trivial

这是怎么这种方法是这样的:

This is how this approach looks like:

[注意事项]

如果您忘记了螺旋形,并希望填补内部有锯齿形或类似的模式,那么这是不是很难 螺旋充填,使很多艰苦的几何问题,如果你不熟悉的几何形状和矢量数学这个任务可能是在这一领域的一个太大的挑战初学者甚至是中等熟练的程序员,以使其正常工作。 这至少是我的意见(我这样做过),所以它处理这样。
 
精彩推荐
图片推荐