Question

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#.

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top