in reply to Contour mapping?
I realize the sample is too small to draw any conclusions, but it's worth noting that all the X values are unique, as are all the Y values. Also, if I sort on either X or Y, and look at intervals between the points on the given axis, there's very little repetition (but the little repetition I see appears near the middle of the range from shortest to longest interval). In other words, the distribution of sample points over the XY plane appears to be pretty well randomized, and is likely to be fairly dense.
It might be interesting to look at a sample of the "triangle" data, along with the corresponding rows of XYZ coordinates that it refers to. I'd be curious whether the triangles evince some relevant property, like (maybe): no XY coordinate is contained within any such triangle, or the XY plane is fully covered without overlap by the set of triangles, or the Z values satisfy some condition for each set of three points, or whatever. (There was presumably some motivation for defining the triangles, and one can hope that it would be relevant to the task at hand.)
Apart from that, if your primary goal is "to determine ... the angle, relative to the origin, of each of the ... lines between nodes that make up each contour", I'd be tempted to set "arbitrary subdivisions" of the X and Y ranges as well, to quantize and simplify (at least for a first pass) the process of interpolating endpoints for those lines whose slopes are to be reported.
Or maybe the triangle data will provide some way to simplify that process? E.g. get the XYZ centroids of the triangles (if they don't overlap), or maybe even interpolate the Z value at a uniformly quantized XY point that happens to fall within the triangle. I don't know...
Of course, just getting a visual display of (some portion of) the surface via gnuplot or whatever would be a good start, too.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Contour mapping?
by BrowserUk (Patriarch) on Apr 28, 2016 at 03:42 UTC | |
I'd be curious whether the triangles evince some relevant property, like (maybe): no XY coordinate is contained within any such triangle, or the XY plane is fully covered without overlap by the set of triangles The triangles are a non-overlapping mesh (Delaunay or complient Delaunay Trangulation); the data is from a Finite Element Modeling program. And yes; I'm also pretty sure the triangles are the key. Having played a little with my stratification idea; it is clear that it is going no where -- producing a tangled web of string rather than nice flowing contours. This is what I now think I need to do: Starting with a simple triangular mesh of points, with the heights at the nodes:
I pick my contour values -- integers 3 to 8 are convenient for this examples -- and process the edges of the triangles linearly (being careful not to process edges twice where they are part of two triangles), and interpolate the positions on those edges where any of my chosen contour values will cross. Eg. On the edge between value 2 and 5.5, I find the positions are which 3, 4, 5 cross that edge; and store those coordinates in separate arrays for each value. I end up with something as below:
Then it just a case of ordering those arrays of points to produce the polylines that make up the contours something like this:
I don't have a full handle on the ordering process; but I've a few ideas to try. (Actually, I don't need to order them to do the intersections with the boundaries; though it might be nice to draw the contours to see that they are correct before going on.) Then all I have to do :) is work out which of those contours intersect the polylines that form the boundaries and work out where and at what angle they intersect. And then I can start on trying to collate the results in a way that is meaningful...the driving force behind the whole problem. 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.
| [reply] [d/l] [select] |
by graff (Chancellor) on Apr 28, 2016 at 07:02 UTC | |
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: (updated wording in a couple bullet points) | [reply] |
by pryrt (Abbot) on Apr 28, 2016 at 13:24 UTC | |
I think this is going in a better direction than my suggestion. Regarding ordering: Those triangles ended up being a lot more help than I originally thought they would (++graff). Very interesting discussion, and I'll have to store away some of these concepts if I ever need the details of the contours, rather than just being able to visually see them. | [reply] |