用均匀的间距填充区域 [英] Fill the area with uniform spacing
本文介绍了用均匀的间距填充区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用户要求
输入
- 用户将给出其要填充多边形形成的区域的闭合多边形P的边界点.中的红点P 例子.
- 在行之间留有空格S.示例中绿点线之间的间距S.
- User will give boundary points of the closed polygon P in which he wants to fill the area formed by polygon. Red Points P in the Examples.
- Space S in between the lines. Spacing S between the lines of Green points in Examples.
输出
输出将是一个封闭的多边形点.示例中的绿色G点.
The output will be a closed polygon points. Green G points in the Examples.
有人可以帮我吗,我不知道该使用哪种算法.
Can someone help me, i don't know which algorithm to use.
推荐答案
该示例看起来像是这样创建的:
The example looks like it was created like this:
- 创建一个具有所需间距的六边形堆积点的区域;
- 选择红色形状内的斑点;
- 想象一下在每对相邻点之间有随机权重的一条边(每个点最多可有6个邻居),并使用Kruskal或Prim算法(它们都是可谷歌搜索的)将它们连接到最小权重生成树中;
- 围绕结果树跟踪
这篇关于用均匀的间距填充区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文