I have two tables Point and Polygon and I want to make an order of polygon's points using an algorithm, algorithm that can tell me this point is the first of the polygon and then the second.., is there any algorithm already found to order a polygon's points? Thank you
Asked
Active
Viewed 572 times
1
-
Please define "order". – meowgoesthedog Jun 27 '18 at 15:35
-
When you want to draw a polygon you need to have an order or your point, to create a correct polygon, without any intersection between two lines – Bob Jun 27 '18 at 15:39
-
You need a library to separate any polygon into non self-intersecting constituent parts. **Clipper** might be useful. – meowgoesthedog Jun 27 '18 at 15:45
-
Does Clipper order all the points your give for a certain polygon? Thank you so much for your answer – Bob Jun 27 '18 at 15:52
-
Not sure, but Clipper might be useful for the first stage. – meowgoesthedog Jun 27 '18 at 15:53
1 Answers
1
There are no one solution for this task. You can build few different polygons on the same points.
If you need any possible polygon you can try this how to order vertices in a non-convex polygon (how to find one of many solutions)

Andriy Zayats
- 31
- 3