Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Contour mapping? (Thank Dog for anonymonk.)

by Anonymous Monk
on Apr 28, 2016 at 22:00 UTC ( [id://1161813]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Contour mapping? (Thank Dog for anonymonk.)
in thread Contour mapping?

Thank me by not banning Anonymous Monk. Seriously, thanks for the feedback. I do all these short clear solutions, like Re^2: Comparing Lines within a Word List, Re: Comparing Lines within a Word List, and Re^2: Perl program to generate a descending order of 9-unique digit numbers, and nobody says a peep.

BTW, the vector for constant height comes from

(P1 - P0) crossproduct (P2 - P0) crossproduct (0, 0, 1) Where P0 P1 P2 are points of the triangle, and (0, 0, 1) is the vertical vector

Replies are listed 'Best First'.
Re^4: Contour mapping? (Thank Dog for anonymonk.)
by Anonymous Monk on Apr 28, 2016 at 23:09 UTC

    Another BTW. Take that first crossproduct. It gives you a vector normal to the plane of the triangle. Cross it with a northern (y axis) vector and normalize the result. Then draw that triangle using a color proportional to the x component. Do for all triangles and you should get a pretty sun shaded picture of your data.

      One interesting, but awkward possibility -- that may never occur, but has to be dealt with in case it does -- is if all three points of a triangle are equal.

      Then the plane is flat and 'my angle' could cross it with any orientation. I'd have to look to the triangles adjoining the other two sides of the triangles that adjoin at my boundary to see how the potential flows through this boundary segment. Does your vector math cater to that?

      Thinking about it more, if a triangle is flat, then it is either a local peak or trough and the potential will flow around, but not through it.

      And that leads to the fact that if any segment on my boundary is formed by a pairs of points with equal height, then the potential will not cross the boundary through that segment at all, but rather will flow through the adjoining triangles, parallel to it; or not at all in the flat triangle case.


      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.

        It may be too late, but I found another good reference on Wikipedia: it appears that AM was basically describing the Meandering Triangle variant of the Marching Squares algorithm.

        To handle the case of vertices being equal, that article uses isobands instead of isobars (contour lines): label each point in the triangle (0 for points less than your level, 1 for points equal to your level, and 2 for points greater than your level), and then follow their lookup table for the shape of the isoband.

        Cheat. Put a new point of slightly different height in the middle of the triangle to form three new triangles that don't have this problem. :)

Re^4: Contour mapping? (Thank Dog for anonymonk.)
by Anonymous Monk on Apr 28, 2016 at 22:41 UTC
      all these short clear solutions... and nobody says a peep

    #JeSuisAnonymousMonk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1161813]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-16 10:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found