[英]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.