Then one way to fill in the missing requirement would be a "local" convex hull, where the definition of "local" can vary. My first idea would be to define a radius length that is a bit longer than the maximum "distance to closest neighbor point" (or just set by some person), pick an extreme point (leftmost, for example), draw the radius starting at that point and pointing "away" from the other points (to the left, using the same example), then sweep it clockwise from there until it hits another point. Then draw the radius from this new point back toward the previous point and then spin the radius clockwise again to find the next point. Continue until you get back to the starting point, at which time your sequence of points will have defined a closed polygonal border at least around some (at least two) of the points (if there are points left over, repeat the process for them).

- tye        


In reply to Re^4: Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks (locally convex) by tye
in thread Better maps with Math::Geometry::Voronoi, and a Challenge for Math Monks by samtregar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.