Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 1
    $\begingroup$ If this really works as indicated it needs to hit "Good Answer" status. $\endgroup$ Commented Feb 21, 2012 at 13:27
  • $\begingroup$ The ReplaceRepeated part looks potentially slow. Have you tested this with largish polygons yet? $\endgroup$ Commented Feb 21, 2012 at 13:30
  • $\begingroup$ @Mr.Wizard I haven't tried larger polygons yet. I agree about the ReplaceRepeated but it's the best I could come up with for now. If you know about a better way to join a set of edges I would be interested. $\endgroup$ Commented Feb 21, 2012 at 13:32
  • $\begingroup$ Honestly I cannot even tell what your code is doing yet. It must have been a lot of work putting it together. Some time later I shall work through it and see what possible improvements come to mind. If I don't get around to it in the next couple of days please remind me. $\endgroup$ Commented Feb 21, 2012 at 13:38
  • 1
    $\begingroup$ @Mr.Wizard, Heike I think the major drawback is the (lack of) handling of disconnected polygons in the form of Polygon[{{{1, Sqrt[3]}, {1/2, Sqrt[3]/2}, {0, Sqrt[3]}}, {{-(1/2), Sqrt[3]/ 2}, {-1, Sqrt[3]}, {0, Sqrt[3]}}}]. This quickly leads to a combinatorial explosion when one has to check each subpart in poly1 with every other in poly2, if there is no pretesting for whether two polys are touching or not. Also, it leaves some redundant coordinates in the result like {{0,0}, {0,0}, {0,0}}. Of course, this might be useful for the user, but there should be some means to remove them. $\endgroup$ Commented Mar 28, 2012 at 18:11