So, start at the highest point, follow each of edges of each of the triangles that contain that point, recursively ... to what end? Where am I going?...

I have no idea how efficent this will be; probably, the official literature will get you down a better path. However, my thought:

  1. Make a subset of all the points that are connected to the top point (directly or indirectly) that are within deltaz from the top z_t. (So you might end up going down a few triangles, but stop if any of the z are less than z_t-deltaz)
  2. sort the subset by each point's angle from z_t; example:
    $top = [$x_t,$y_t,$z_t]; # you got this from your maxima search @subset = ( [$x0,$y0,$z0], [$x1,$y1,$z1], ...); # the subset in step1 @contour = sort { atan2($a->[1] - $top->[1], $a->[0] - $top->[0]) <=> atan2($b->[1] - $top->[1], $b->[0] - $top->[0]) } @subset;
  3. that sorted list is now the contour line -- every point in that list is within the same height band, and it is sorted such that you could draw a counterclockwise line through those points as your "contour", or calculate other angles as needed along the same contour.

In reply to Re^3: Contour mapping? by pryrt
in thread Contour mapping? by BrowserUk

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.