Intersections of two sets of contours [message #3632] |
Thu, 09 February 1995 09:19 |
ryba
Messages: 33 Registered: October 1992
|
Member |
|
|
I have a problem that maybe someone has already created
optimized/debugged code for.
I am doing a simulation of a surface, and calculate some value,
call it Z(x,y). Now, my sensor creates "maps" of Z(u(x,y), v(x,y)).
What I want to create is an image of Z(x,y) with the Z held to some
average value over the resolution cells of u(x,y) and v(x,y). The
problem is that u and v are not well behaved functions with a simple
monotonic mapping; for example, there can be two or more separated
cells of x,y that are in the same resolution cell of u and v. Now, I
can make maps of u(x,y), v(x,y), Z(x,y) and Z(u,v). One
possible approach is to use CONTOUR with PATH_FILENAME to store the
edges of the resolution cells of u(x,y) and v(x,y) (as separate
files). Then, I would have to loop over the resolution cells, find
the points of the pairs of contours that mutually intersect,
interpolate to find the corners, and use polyfill with the color set
by Z(u,v). I then don't need Z(x,y)...but the process seems messy,
and I'm limited by CONTOUR's limit of 31 levels; though I could use
multiple calls to get around that.
Any leads?
--
Dr. Marty Ryba | Generation X:
MIT Lincoln Laboratory | Too young to be cynical,
ryba@ll.mit.edu | too old to be optimistic.
Of course nothing I say here is official policy, and Laboratory affiliation is
for identification purposes only, blah, blah, blah....
|
|
|