Timeline for How to ensure that Polygon[list] plots a simple polygon?
Current License: CC BY-SA 3.0
26 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 11, 2023 at 9:14 | answer | added | Syed | timeline score: 0 | |
Dec 2, 2021 at 17:14 | answer | added | Greg Hurst | timeline score: 3 | |
Dec 2, 2021 at 16:28 | answer | added | ybeltukov | timeline score: 4 | |
Feb 8, 2016 at 21:04 | vote | accept | nilo de roock | ||
Apr 17, 2015 at 20:25 | comment | added | user484 | Some more possible solutions are given in the duplicate question Rebuild a polygon so it doesn't self intersect. | |
Apr 17, 2015 at 19:07 | history | edited | Sjoerd C. de Vries |
edited tags
|
|
Nov 21, 2012 at 13:00 | history | edited | István Zachar | CC BY-SA 3.0 |
added 33 characters in body; edited title
|
Aug 15, 2012 at 0:43 | history | edited | Brett Champion | CC BY-SA 3.0 |
update 'convex' to 'simple' based on OPs comments
|
Aug 15, 2012 at 0:38 | history | edited | Brett Champion | CC BY-SA 3.0 |
formatting
|
Aug 14, 2012 at 21:12 | answer | added | Sjoerd C. de Vries | timeline score: 11 | |
Aug 14, 2012 at 20:47 | history | edited | Sjoerd C. de Vries | CC BY-SA 3.0 |
added 122 characters in body
|
Aug 14, 2012 at 17:54 | history | tweeted | twitter.com/#!/StackMma/status/235434154706214912 | ||
Aug 14, 2012 at 16:46 | comment | added | rm -rf♦ | Also, now that you know that "convex" polygon is wrong terminology, you should update your question so that others aren't misled by your incorrect question. | |
Aug 14, 2012 at 13:47 | answer | added | jVincent | timeline score: 6 | |
Aug 14, 2012 at 13:23 | comment | added | jVincent | @ndroock1 Polygon doesn't plot unexpected polygons, it plots exactly what you tell it to plot. The order of the points matters however as you have learned. There isn't one particular "correct" order of traversing a number of points to form a polygon, so while you can find a different order which doesn't contain intersecting lines it may not be the one you where actually expecting. I suggest posting your full problem, since I suspect you could avoid this problem completely by always inserting a new point ordered in between the two nearest already present points, rather then prepending. | |
Aug 14, 2012 at 12:20 | comment | added | acl |
so, is this a correct way to express what you want: given a list of points, arrange them so that Polygon does not produce a polygon which can be cut in two by removing a single point
|
|
Aug 14, 2012 at 10:45 | history | edited | Mr.Wizard | CC BY-SA 3.0 |
added 4 characters in body
|
Aug 14, 2012 at 9:53 | comment | added | Niki Estner |
@ndroock1: I'm not sure what you want. Do you want to minimize self-intersections? Would FindShortestTour work?
|
|
Aug 14, 2012 at 9:51 | comment | added | nilo de roock | I'll have to look into the ConvexHull package stuff. | |
Aug 14, 2012 at 9:51 | comment | added | nilo de roock | Thanks, @acl. Yes, it is ambiguous, I know. Think of a polygon and clicking 'somewhere' adds a point to the polygon with the ability to move it to the spot where you want it. Now, sometimes Polygon plots unexpected polygons from a list of points. That's what I am trying to ' fix '. | |
Aug 14, 2012 at 9:24 | comment | added | acl | Sort of, but I think it is ambiguous. Would the convex hull work? It might not include all the points | |
Aug 14, 2012 at 9:08 | comment | added | nilo de roock | That one is not convex by the way. I have been using the wrong words I realized. I don't want the ones which look like connected via a single point. Does that makes sense? | |
Aug 14, 2012 at 9:05 | comment | added | nilo de roock | p1 = {-1, 1}; p2 = {1, 1}; p3 = {-1, -1}; p4 = {1, -1}; p5 = {0, 0}; p = {p1, p2, p4, p3, p5} would pass. | |
Aug 14, 2012 at 8:57 | answer | added | Niki Estner | timeline score: 6 | |
Aug 14, 2012 at 8:55 | comment | added | acl |
to understand better what you want, suppose I had p = {{-1, 1}, {1, 1}, {-1, -1}, {1, -1}, {0, 0}} ; what polygon should be plotted?
|
|
Aug 14, 2012 at 8:38 | history | asked | nilo de roock | CC BY-SA 3.0 |