Library or advice for synchronizing heightmaps of different tessellations?

Started by
1 comment, last by gtzpower 12 years, 2 months ago
Hi everyone. I am tasked with synchronizing 2 tesselations of heightmap data where the sample spacing of the second height map is dynamic (one set of data may have a 20 cm sample spacing where as another set of data may have a 1 meter sample spacing, and I need to be able to apply both to my height map as best as I can). I need something that will take height data (rows and columns of floats), a source sample spacing and a destination sample spacing, and have it return the best fit for representing the data with the new sample spacing. If that doesn't make sense, refer to the graphic below. I want to pass in the red data and get back the blue data as shown in the AFTER part:

tessellation.png

Alternatively, if this type of functionality is not readily available, are there any tips on how to mathematically do it?
Advertisement
Let me rephrase your question to see if I understand it: If you have data at points of a particular grid, how do you infer the value at a different set of points?

This can be reduced to: If you have data at points of a particular grid, how do you infer the value at an arbitrary point?

The answer is "interpolation". Your plot suggests that you want linear interpolation of the data, which is fairly straight forward (in 2D there is bilinear interpolation), and it's even available in hardware on graphics cards. In general, there are many interpolation algorithms that can be used for geographic data. Some are quite sophisticated. I would say, if you are happy with the results of bilinear interpolation, go with it. But for some purposes it won't be enough.
Thanks! Bilinear interpolation is the phrase I was looking for which will help me find something. A glance at wikipedia reveals an equation that I had independantly came up with, but I wasn't sure if ithe theory would hold up. So that answer is spot on! :) Thanks again!

This topic is closed to new replies.

Advertisement