An IsoContour Question [message #79907] |
Mon, 16 April 2012 14:32 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
While I'm on a role (or, at least while I have Josh's attention)
let me ask another contour question. This weekend I wanted to
find the area enclosed by an isocontour at a particular level
in my data.
When I created a contour plot and used a single contour level,
I sometimes got multiple polygons, and sometimes I even got
polygons within polygons, depending on the data. Generally,
speaking when a polygon is entirely contained within another
polygon, the smaller polygon's area needs to be subtracted from
the total area, etc. I understand all that. And I actually
worked all of this out with PATH_XY and other PATH keywords
to the Contour command. (You can determine the direction of
the polygon by examining fields in the PATH_INFO structure.)
All well and good. But, initially, I though I would try to
use the ISOCONTOUR command to create the polygons that I
was sending to IDLanROI to calculate path geometry. This
is advertised by the documentation as interpreting the
"contouring algorithm found in the IDLgrContour object."
If true, this may go a long way toward explaining why
that venerable old "new" graphics system never caught on.
Has anyone managed to get this to work. It seemed to
have all the parts there, and I got reasonably good
looking vertices and connectivity arrays. I just couldn't
make any sense of the polygons in those arrays.
In the end, I couldn't see how I could use these paths
in the way I needed to, since I couldn't figure out how
to tell the "direction" of the polygons, so I couldn't tell
if I needed to add or subtract the polygon area from the
area I was trying to figure out. So, I stopped pursuing
the polygons themselves. Here is my question. Has anyone
managed to use the polygons returned from ISOCONTOUR
for anything useful?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|