This is something that I find comes up quite a bit when programming, and I'm always in search of better / more elegant solutions... I'm sure there will be some well established maths techniques for this, if only I knew what to google for: <_<
Anyway, the problem is as follows:
- You have a 2d array of values (think a texture). Could be RGB colours, could be normals, whatever. But for sake of simplicity if we consider this just 1 value at each location, perhaps a float.
- Your starting knowledge of the array is incomplete. That is, you know a number of xy locations on the array, and their value, but nothing of the values inbetween.
- The task is to use some kind of SMOOTH interpolation to guess all the locations in between the known data.
I realise of course that there is no fixed solution.
[attachment=32535:array.png]
I won't describe here the approaches I've used before, as I'm really interested in what springs to mind to others, rather than biasing the answers.
One key aspect though is that it should not involve simply partitioning the known data into triangles, and doing interpolation over just the triangles. This gives the ugly look I'm trying to remove by the processing. Each interpolated point should be taking into account e.g. 10+ data points to find a solution.
This is also a pre-process, so the emphasis isn't on speed. However equally well it should be able to perform without taking hours for say, interpolation of triangle corners on a UV map, so be able to deal with interpolating 30,000 or so data points on a 4096x4096 array.
So fire away with your ideas! :D