문제

I'm doing plane sweep polygon triangulation. And for example, when I encounter split vertex, I should make it helper of edge of polygon that is lying immediately above this (split) vertex. Also, I should have data structure (sweep line status) that has sorted edges from top to bottom. How do I sort them and how do I determine what edge of polygon is lying immediately above processed vertex? I'm doing program in C#.

도움이 되었습니까?

해결책

I found one way to do it.

I can find intersection between sweep line and edges of polygon and then sort them by X coordinates of their intersection points. That way I can also easily find out which edge lies immediately above current vertex.

I'm just wondering if there is some more efficient way?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top