[英]Find Outer Edges On A Grid
我正在使用一种算法,该算法具有构造点的网格,每个点都有一个 X 和 Y 坐标。 网格被分成几个程序区域。 我正在寻找一种方法来通过这些区域中存在的顶点找到每个区域的外边缘(不同的区域用不同的颜色表示)。 我有网格中所有顶点的二维数组,以及每个单独区域的 2D arrays,包含该区域中的所有顶点。
我现在想知道如何创建一种算法来找到每个区域的外边缘,同时忽略“内部”部分。 我目前在 Unity3d 中使用 C#,但编程语言并不是很重要。 我正在寻找一种假设如何完成的通用算法。 我不知道从哪里开始
您可以像这样识别边缘点:
这是一个点(任何一个):
算法:遍历所有点并测试每个点(最多)4 个邻居以确定以上两点中的任何一个是否适用。
复杂度:O(n)(点数)
[英]Find the Useless Edges in a Graph
[英]How to find edges in route
[英]Find edges of images
[英]Find the first outer brackets
[英]Find all critical edges of an MST
[英]Find the maximum number of edges in the graph
[英]Find inner geometry from edges
[英]Algorithm to find the edges of tetrahedra meshes
[英]Area of grid polygon given length of edges
[英]Best Algorithm to find the edges (polygon) of vertices
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.