Greetings,
I am trying to optimize my code a bit. I have two FlatFields of the
same type (range->height) which produce two curves on the same display.
(Please see the right panel of:
http://www.cimms.ou.edu/~kmanross/VCPRPE/VCPRPE_terrainAndBeamPath.gif)
I want to obtain all the ranges where the smooth curve lies below the
jagged curve. Currently, I am looping through the range points,
obtaining the values for each curve (smooth, jagged) at each point and
determine which is greater (saving those range points where the jagged
curve is greater than the smooth curve), and moving on to the next range
point.
This works sufficiently, but 1) depending on the resolution I want (low
= 400, high = 1600) along the range, I am making that many comparisons
each time I move the red line on the left panel. 2) To calculate for
the entire circle on the left panel (720 red lines), that means I am
making between 288,000 and 1,152,000 comparisons. On my machine (1.2
GHz CPU, 1 Gb RAM) this takes about 40 seconds to do.
Is there a better way to find the intersection of two FlatFields?
On another performance topic, I have noticed that the smaller I shrink
my VisAD displays, the more responsive the DirectManipulationRenderers
are, and vice versa. I believe this is a somewhat common behavior that
deals with rendering as I have seen similar retardation with expanding
an .mpg or video game. Is this slowness vs. size tradeoff just
something to live with, or is there a way that I can speed things up?
Many thanks to those who have responded to my questions. I keep hoping
that I will become proficient enough to return the favor. ;-)
-kevin.
--
+------------------------------------------------------------+
Kevin L. Manross [KD5MYD] (405)-366-0557
CIMMS Research Associate kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN] http://www.cimms.ou.edu/~kmanross
"My opinions are my own and not representative of CIMMS, NSSL,
NOAA or any affiliates"
+------------------------------------------------------------+