09-17-2008 03:34 AM
I'd like an intensity graph for non-rectangular data, somewhat like this color coded temperature map from USA Today...
http://www.usatoday.com/weather/temppic/wtempusa.htm
... might be calculated from the temperatures of those 100 or so cities.
If that link is broken, it shows the temperature at about 100 locations roughly evenly spaced across the United States, and the background has smoothly varying colors which correspond to the temperatures.
Using this as an example, I could easily calculate a rectangular grid of temperatures and send it to LabVIEW's intensity graph by taking each point in my imaginary rectangular grid, the one being sent to LabVIEW's intensity graph, then calculating a weighted temperature for that point by averaging the weighted temperature for EVERY CITY by 1/r^2 (the reciprocal of the square of the distance of each city's temperature from the imaginary rectangular point).
That seems computationally intensive. I could only use the N nearest cities for that computation, but in calculating what cities are nearest, then I'd have to look at every city per rectangular point again. In addition, there would be some visible discontinuities in my resulting intensity graph when switching from one set of N cities to another.
Is there a better way to do this?
09-17-2008 03:46 AM
Hi there
have you tried the "3D surface graph"? You still have to supply 2D data, but the control does the color smoothing by itself. See attachment.
09-17-2008 03:55 AM
The color smoothing is certainly nice in that example, and I'm sure I can use that code elsewhere; but it takes rectangular data.
My objective is to convert some non-rectangular data of M points, such as M cities' temperatures in the United States, and convert it to a rectangular intensity-graph-looking bitmap such that I don't have to use all M points/cities to calculate each pixel on the bitmap, but just the nearest N points/cities. I'm wondering if it is even possible to do that without visible discontinuities.
09-18-2008 05:47 PM
As Chris stated in his post, the intensity graph still needs a rectangular data input.
Unless you can take your variant data and convert it into a rectangular data, the intensity graph will not be able to interpret M points.
I assume that you just want to put a set of values for each city and the area in between cities would have an average of the city values.
Regards,
Juan Galindo
Applications Engineering
National Instruments
09-18-2008 07:10 PM