I have a (large) dataset that consists of and X,Y coordinate pair and a real number (0.0 -> 3.0) representing an attribute, call it a height, and I want plot contour lines connecting points of similar heights.

Any thoughts or pointers on how to start?

The data looks like this, but there is not enough (of the 2.4 millions points) here to do anything useful with:

-69.282032302755084 40.000000000000014 0 -69.123493781255831 39.908467741935496 -1.4443382565142906e-006 -68.748013135538145 40.911009397420145 0 -68.964955259756593 39.816935483870985 -2.990721348858345e-006 -68.370049396495517 40.298149116372635 -6.3944096502804299e-006 -68.202015544462682 41.814890597403163 0 -67.658222977894795 40.432681542784742 -1.1025156665695599e-005 -68.80641673825734 39.725403225806467 -4.7264009945253546e-006 -68.647878216758102 39.633870967741949 -6.7019561401411285e-006 -68.489339695258849 39.542338709677438 -8.9173860088063258e-006 -67.970337613779577 39.892083135646438 -1.3463345566431798e-005 -67.644134662322315 42.711486110711832 0 -66.168460737542475 40.816251240724036 -7.7940171180040021e-006 -66.403424513471577 39.677023978360658 -3.2568451287380103e-005 -67.417482219894339 39.751269670319942 -2.2905275056155327e-005 -68.330801173759596 39.45080645161292 -1.132337127325882e-005 -68.172262652260343 39.359274193548401 -1.4263293915609116e-005 -68.013724130761105 39.267741935483883 -1.7815964293169953e-005 -67.074467692415936 43.600639717542869 0 -65.320216546227712 42.631856022495803 -2.5121171527202102e-005 -64.452638549546535 41.120575875191086 4.5678927263972832e-005 -65.2313333965173 39.144242118219182 -1.7497211352324817e-005 -66.154489394499308 39.00980515543462 -6.3610401599566315e-005 -66.84644386289331 39.27582098868416 -4.1213274977535648e-005 -67.855185609261852 39.176209677419372 -2.1907142377233984e-005 -67.696647087762614 39.084677419354854 -2.6613602927452167e-005 -67.538108566263361 38.993145161290336 -3.1880809503868505e-005 -66.493113891610946 44.482196494745864 0 -63.455014677037695 42.328563579380834 -6.7791580746250923e-005 -63.743298666018838 43.86849215765006 -0.00012339986352570304 -63.010618308126652 40.142191039199616 0.00028666487947822099 -63.74890107758462 38.983319224147046 0.00022091344000053716 -62.272335538668685 41.301062854252187 9.8592328446381225e-005 ...

I also have another set of data that connects the points as triangles. The numbers are indexes into the dataset above, and the indexes are "given in counter-clockwise direction". Whether that means that the first node of each triangle is the right-most I'm not sure, but otherwise I'm not quite sure why that is specified, beyond completeness.

My thoughts so far are:

Note: I'm not actually wanting to plot the mesh and contours at this point; though that's a possibility later. What I need to determine is the angle, relative to the origin, of each of the (short) lines between nodes that make up each contour. That's easy once I have the set of points and their order than make up each contour.

Some contours will be partial -- starting and/or ending at the edge of the data space.

I'm certainly not expecting code; but just clues on how to begin. Thanks.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to 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.