Greetings geometry monks. Here's my problem - I have a set of points on a grid and I want to draw a line around them. I believe this is basically what
Math::ConvexHull was born for, but please correct me if I'm wrong. My problem is that instead of drawing a line around the points I'm getting a line that darts in and out of the volume, producing a very non-convex shape. It's all, um, spiky.
More detail - the points are longitude and latitude, although the scale is small enough that I should be able to pretend the grid is flat. However, that means that they're signed floats and the delta between them is relatively small.
I can post my data if need be, but it's pretty voluminous and hard to interpret without a graphing system, which I don't have to post at the moment. Perhaps someone can help me without a working example?
Thanks,
-sam
PS: I'm not stuck on using Math::ConvexHull for this. If you know of a more suitable tool I'd be happy to hear it. It doesn't need to be particularly fast.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.