http://qs321.pair.com?node_id=1161734


in reply to Re^2: Contour mapping?
in thread Contour mapping?

Wow.

I'd say don't worry about ordering (until later). Take one triangle at a time, and look at its three edges in whatever sequence is given.

For 2.4 million vertices (how many triangles?), it's a lot to keep track of, but it seems like just a matter of looping over triangles, and for each of those, looping over edges, keeping track of the edges you've done, and keeping a properly indexed list of iso-contour line segments as they come up, so that you know when you encounter each interior edge the second time, and can traverse the connections of linked contour lines.

Regarding that first point above, the logical possibilities are:

  1. None of the three edges contain a whole-number Z value
  2. One or more of the vertices is itself a whole-number Z value
  3. An edge contains just one whole-number Z value, so that value appears on one other edge (or may be the at the opposite vertex)
  4. An edge contains two or more whole-number Z values; either all those values will also appear on one other edge, or else they'll be divvied up among the other two edges (or one of them may be at the opposite vertex)
I hope you have a generous schedule (and are getting paid enough) for doing this. Sounds like a lot of work.

(updated wording in a couple bullet points)